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

Usage::

    error_caching_wsgi_app = ErrorMiddleware(wsgi_app)

Settings:

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

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

  ``error_log``:
      a filename to append tracebacks to

  ``show_exceptions_in_wsgi_errors``:
      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

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

  ``xmlhttp_key``:
      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:

  ``paste.throw_errors``:
      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.

  ``paste.expected_exceptions``:
      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

 application
 debug_mode
 error_email
 error_log
 error_message
 error_subject_prefix
 from_address
 show_exceptions_in_wsgi_errors
 smtp_server
 xmlhttp_key

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

Generated by  Doxygen 1.6.0   Back to index