forked from orbit-oss/flask
Update documentation and regression tests to clarify that Flask.teardown_appcontext() only receives unhandled exceptions
This commit is contained in:
parent
5909e26fba
commit
a417e41d27
2 changed files with 56 additions and 3 deletions
|
|
@ -1484,8 +1484,10 @@ class Flask(_PackageBoundObject):
|
|||
Since a request context typically also manages an application
|
||||
context it would also be called when you pop a request context.
|
||||
|
||||
When a teardown function was called because of an exception it will
|
||||
be passed an error object.
|
||||
When a teardown function was called because of an unhandled exception
|
||||
it will be passed an error object. Note that if a :meth:`errorhandler`
|
||||
is registered, it will handle the exception and the teardown will not
|
||||
receive it.
|
||||
|
||||
The return values of teardown functions are ignored.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue