Logo Search packages:      
Sourcecode: paste version File versions  Download package

paste::exceptions::errormiddleware::ErrorMiddleware Class Reference

List of all members.

Detailed Description

Error handling middleware


    error_caching_wsgi_app = ErrorMiddleware(wsgi_app)


      If true, then tracebacks will be shown in the browser.

      an email address (or list of addresses) to send exception 
      reports to

      a filename to append tracebacks to

      If true, then errors will be printed to ``wsgi.errors`` 
      (frequently a server error log, or stderr).

  ``from_address``, ``smtp_server``, ``error_subject_prefix``:
      variables to control the emailed exception reports

      When debug mode is off, the error message to show to users.

      When this key (default ``_``) is in the request GET variables
      (not POST!), expect that this is an XMLHttpRequest, and the
      response should be more minimal; it should not be a complete
      HTML page.

Environment Configuration:

      If this setting in the request environment is true, then this
      middleware is disabled. This can be useful in a testing situation
      where you don't want errors to be caught and transformed.

      When this middleware encounters an exception listed in this
      environment variable and when the ``start_response`` has not 
      yet occurred, the exception will be re-raised instead of being
      caught.  This should generally be set by middleware that may 
      (but probably shouldn't be) installed above this middleware, 
      and wants to get certain exceptions.  Exceptions raised after
      ``start_response`` have been called are always caught since
      by definition they are no longer expected.

Definition at line 25 of file errormiddleware.py.

Public Member Functions

def __call__
def __init__
def exception_handler
def make_catching_iter

Public Attributes


The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index