reword _get_exc_class_and_code docstring
This commit is contained in:
parent
d8d74b0cc8
commit
6ec98f0749
1 changed files with 5 additions and 3 deletions
|
|
@ -1270,10 +1270,12 @@ 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: the class for the exception, or
|
||||
exception code as integer
|
||||
: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]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue