Skip to content
Myr

Added note on teardown in debug mode. Fixes #661

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent 3b393f8 · Browse files · 1 file+7 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+7 added−0 removed

  • other:+7 added−0 removed

1 file+7 added−0 removed

modified:flask/app.py+7 added
1248 unmodified lines
1249 statements and log occurring errors.12501251 When a teardown function was called because of a exception it will1252 be passed an error object.12531254 .. admonition:: Debug Note12551256 In debug mode Flask will not tear down a request on an exception1257 immediately. Instead if will keep it alive so that the interactive1258 debugger can still access it. This behavior can be controlled1259 by the ``PRESERVE_CONTEXT_ON_EXCEPTION`` configuration variable.1260 """1261 self.teardown_request_funcs.setdefault(None, []).append(f)1262 return f1263
560 unmodified lines