diff --git a/flask/app.py b/flask/app.py index c570a95b..c3a455ac 100644 --- a/flask/app.py +++ b/flask/app.py @@ -1270,7 +1270,13 @@ class Flask(_PackageBoundObject): @staticmethod def _get_exc_class_and_code(exc_class_or_code): - """Ensure that we register only exceptions as handler keys""" + """Get the exception class being handled. For HTTP status codes + or ``HTTPException`` subclasses, return both the exception and + status code. + + :param exc_class_or_code: Any exception class, or an HTTP status + code as an integer. + """ if isinstance(exc_class_or_code, integer_types): exc_class = default_exceptions[exc_class_or_code] else: