Update documentation and regression tests to clarify that Flask.teardown_appcontext() only receives unhandled exceptions

This commit is contained in:
Bijan Vakili 2017-07-07 17:34:44 -07:00
parent 5909e26fba
commit a417e41d27
2 changed files with 56 additions and 3 deletions

View file

@ -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.