mirror of https://github.com/pallets/flask.git
document _get_exc_class_and_code params
This commit is contained in:
parent
53f5fd234b
commit
d8d74b0cc8
|
@ -1270,7 +1270,11 @@ class Flask(_PackageBoundObject):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _get_exc_class_and_code(exc_class_or_code):
|
def _get_exc_class_and_code(exc_class_or_code):
|
||||||
"""Ensure that we register only exceptions as handler keys"""
|
"""Ensure that we register only exceptions as handler keys
|
||||||
|
|
||||||
|
:param exc_class_or_code: the class for the exception, or
|
||||||
|
exception code as integer
|
||||||
|
"""
|
||||||
if isinstance(exc_class_or_code, integer_types):
|
if isinstance(exc_class_or_code, integer_types):
|
||||||
exc_class = default_exceptions[exc_class_or_code]
|
exc_class = default_exceptions[exc_class_or_code]
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue