forked from orbit-oss/flask
Merge pull request #3253 from aligoren/document-get-exc-class-and-code
Added :param to the _get_exc_class_and_code method docstring
This commit is contained in:
commit
d5fea5fa1d
1 changed files with 7 additions and 1 deletions
|
|
@ -1270,7 +1270,13 @@ 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"""
|
"""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):
|
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…
Add table
Add a link
Reference in a new issue