Skip to content
Myr

Updated documentation. Replaced term development mode with debug mode. #2261

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

authored by Tully Rankin · committed by Tully Rankin · parent b11f735 · Browse files · 1 file+8 added−7 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+8 added−7 removed

  • other:+8 added−7 removed

1 file+8 added−7 removed

modified:docs/reqcontext.rst+8 added-7 removed
117 unmodified lines
118 unhandled exception down the road or if a before-request handler was119 not executed yet or at all (for example in test environments sometimes120 you might want to not execute before-request callbacks).121122Now what happens on errors? In production mode if an exception is not123caught, the 500 internal server handler is called. In development mode124however the exception is not further processed and bubbles up to the WSGI122Now what happens on errors? If you are not in debug mode if an exception is not 123caught, the 500 internal server handler is called. In debug mode 124however the exception is not further processed and bubbles up to the WSGI 125server. That way things like the interactive debugger can provide helpful126debug information.127128An important change in 0.7 is that the internal server error is now no
84 unmodified lines
213214Starting with Flask 0.7 you have finer control over that behavior by215setting the ``PRESERVE_CONTEXT_ON_EXCEPTION`` configuration variable. By216default it's linked to the setting of ``DEBUG``. If the application is in217debug mode the context is preserved, in production mode it's not.217debug mode the context is preserved. If debug mode is set to off, the context218is not preserved.219219Do not force activate ``PRESERVE_CONTEXT_ON_EXCEPTION`` in production mode220as it will cause your application to leak memory on exceptions. However220Do not force activate ``PRESERVE_CONTEXT_ON_EXCEPTION`` if debug mode is set to off221as it will cause your application to leak memory on exceptions. However,222it can be useful during development to get the same error preserving222behavior as in development mode when attempting to debug an error that223behavior as debug mode when attempting to debug an error that224only occurs under production settings.