diff --git a/gunicorn/errors.py b/gunicorn/errors.py index 7465edb8..487d4380 100644 --- a/gunicorn/errors.py +++ b/gunicorn/errors.py @@ -4,6 +4,8 @@ # See the NOTICE for more information. +# we inherit from BaseException here to make sure to not be caucght +# at application level class HaltServer(BaseException): def __init__(self, reason, exit_status=1): self.reason = reason @@ -13,7 +15,7 @@ class HaltServer(BaseException): return "" % (self.reason, self.exit_status) -class ConfigError(BaseException): +class ConfigError(Exception): """ Exception raised on config error """