forked from orbit-oss/flask
Updated documentation. Replaced term development mode with debug mode. #2261
This commit is contained in:
parent
b11f7354d1
commit
c590e820aa
1 changed files with 8 additions and 7 deletions
|
|
@ -119,9 +119,9 @@ understand what is actually happening. The new behavior is quite simple:
|
||||||
not executed yet or at all (for example in test environments sometimes
|
not executed yet or at all (for example in test environments sometimes
|
||||||
you might want to not execute before-request callbacks).
|
you might want to not execute before-request callbacks).
|
||||||
|
|
||||||
Now what happens on errors? In production mode if an exception is not
|
Now what happens on errors? If you are not in debug mode if an exception is not
|
||||||
caught, the 500 internal server handler is called. In development mode
|
caught, the 500 internal server handler is called. In debug mode
|
||||||
however the exception is not further processed and bubbles up to the WSGI
|
however the exception is not further processed and bubbles up to the WSGI
|
||||||
server. That way things like the interactive debugger can provide helpful
|
server. That way things like the interactive debugger can provide helpful
|
||||||
debug information.
|
debug information.
|
||||||
|
|
||||||
|
|
@ -214,10 +214,11 @@ provide you with important information.
|
||||||
Starting with Flask 0.7 you have finer control over that behavior by
|
Starting with Flask 0.7 you have finer control over that behavior by
|
||||||
setting the ``PRESERVE_CONTEXT_ON_EXCEPTION`` configuration variable. By
|
setting the ``PRESERVE_CONTEXT_ON_EXCEPTION`` configuration variable. By
|
||||||
default it's linked to the setting of ``DEBUG``. If the application is in
|
default it's linked to the setting of ``DEBUG``. If the application is in
|
||||||
debug mode the context is preserved, in production mode it's not.
|
debug mode the context is preserved. If debug mode is set to off, the context
|
||||||
|
is not preserved.
|
||||||
|
|
||||||
Do not force activate ``PRESERVE_CONTEXT_ON_EXCEPTION`` in production mode
|
Do not force activate ``PRESERVE_CONTEXT_ON_EXCEPTION`` if debug mode is set to off
|
||||||
as it will cause your application to leak memory on exceptions. However
|
as it will cause your application to leak memory on exceptions. However,
|
||||||
it can be useful during development to get the same error preserving
|
it can be useful during development to get the same error preserving
|
||||||
behavior as in development mode when attempting to debug an error that
|
behavior as debug mode when attempting to debug an error that
|
||||||
only occurs under production settings.
|
only occurs under production settings.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue