diff options
Diffstat (limited to 'qc_app')
-rw-r--r-- | qc_app/errors.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/qc_app/errors.py b/qc_app/errors.py index ff656b8..1ce0d1f 100644 --- a/qc_app/errors.py +++ b/qc_app/errors.py @@ -1,5 +1,4 @@ """Application error handling.""" -import logging import traceback from werkzeug.exceptions import HTTPException @@ -14,8 +13,8 @@ def handle_general_exception(exc: Exception): exc.__class__.__module__, exc.__class__.__name__, request.url, trace) return render_template("unhandled_exception.html", trace=trace) -def register_error_handlers(app: Flask): +def register_error_handlers(appl: Flask): """Register top-level error/exception handlers.""" - app.register_error_handler(Exception, handle_general_exception) - app.register_error_handler(HTTPException, handle_general_exception) - app.register_error_handler(mdb.MySQLError, handle_general_exception) + appl.register_error_handler(Exception, handle_general_exception) + appl.register_error_handler(HTTPException, handle_general_exception) + appl.register_error_handler(mdb.MySQLError, handle_general_exception) |