Core Exceptions

These are exceptions that aren’t specific to any one part of FlaskBB and are used ubiquitously.

exception flaskbb.core.exceptions.BaseFlaskBBError[source]

Root exception for FlaskBB.

exception flaskbb.core.exceptions.ValidationError(attribute, reason)[source]

Used to signal validation errors for things such as token verification, user registration, etc.

  • attribute (str) – The attribute the validation error applies to, if the validation error applies to multiple attributes or to the entire object, this should be set to None
  • reason (str) – Why the attribute, collection of attributes or object is invalid.
exception flaskbb.core.exceptions.StopValidation(reasons)[source]

Raised from validation handlers to signal that validation should end immediately and no further processing should be done.

Can also be used to communicate all errors raised during a validation run.

Parameters:reasons – A sequence of (attribute, reason) pairs explaining why the object is invalid.