HTTPExceptionMiddleware

Middleware that catches exceptions in the sub-application. This does not catch exceptions in the app_iter; only during the initial calling of the application.

This should be put very close to applications that might raise these exceptions. This should not be applied globally; letting expected exceptions raise through the WSGI stack is dangerous.


Methods

f __init__(self, application) ...

f __call__(self, environ, start_response) ...

See the source for more information.