Development of an internal social media platform with personalised dashboards for students
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

errors.py 632B

1234567891011121314151617181920212223
  1. # -*- coding: utf-8 -
  2. #
  3. # This file is part of gunicorn released under the MIT license.
  4. # See the NOTICE for more information.
  5. # we inherit from BaseException here to make sure to not be caucght
  6. # at application level
  7. class HaltServer(BaseException):
  8. def __init__(self, reason, exit_status=1):
  9. self.reason = reason
  10. self.exit_status = exit_status
  11. def __str__(self):
  12. return "<HaltServer %r %d>" % (self.reason, self.exit_status)
  13. class ConfigError(Exception):
  14. """ Exception raised on config error """
  15. class AppImportError(Exception):
  16. """ Exception raised when loading an application """