From 6ab569b0e3791cf04db7c333bbf5b78d33255dad Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Sun, 27 Jan 2013 00:56:01 +0000 Subject: [PATCH] Added note on teardown in debug mode. Fixes #661 --- flask/app.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/flask/app.py b/flask/app.py index c9117727..373479f5 100644 --- a/flask/app.py +++ b/flask/app.py @@ -1250,6 +1250,13 @@ class Flask(_PackageBoundObject): When a teardown function was called because of a exception it will be passed an error object. + + .. admonition:: Debug Note + + In debug mode Flask will not tear down a request on an exception + immediately. Instead if will keep it alive so that the interactive + debugger can still access it. This behavior can be controlled + by the ``PRESERVE_CONTEXT_ON_EXCEPTION`` configuration variable. """ self.teardown_request_funcs.setdefault(None, []).append(f) return f