exceptions.py 490 B

12345678910111213141516171819
  1. """
  2. flaskbb.exceptions
  3. ~~~~~~~~~~~~~~~~~~
  4. Exceptions implemented by FlaskBB.
  5. :copyright: (c) 2015 by the FlaskBBB Team.
  6. :license: BSD, see LICENSE for more details
  7. """
  8. from werkzeug.exceptions import HTTPException, Forbidden
  9. class FlaskBBError(HTTPException):
  10. "Root exception for FlaskBB"
  11. description = "An internal error has occured"
  12. class AuthorizationRequired(FlaskBBError, Forbidden):
  13. description = "Authorization is required to access this area."