close Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Changes between Version 1 and Version 2 of ErrorHandling


Ignore:
Timestamp:
Jun 26, 2008, 5:20:06 PM (16 years ago)
Author:
cmlenz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ErrorHandling

    v1 v2  
    11= Error Pages and Debugging Tools =
     2
     3Any exception raised by a [RequestHandlers request handler] (or a [RequestFilters request filter] for that matter) is by default caught by the `error_filter`. This filter is responsible for turning HTTP exceptions such as redirects into the appropriate HTTP response.
     4
     5== Error Page Templates ==
     6
     7For any HTTP exception associated with a status code greater than or equal to 400 (Bad Request), the error handling request filter will render a template named `error/%(status_code)d.html`, if such a template is found, or the generic `error.html` otherwise.
     8
     9For example, to customize the error page for `404 Not Found` errors, you'd create a `error/404.html` template in your templates directory.
     10
     11The template is passed the exception value under the name “error”, so that it can show details about the error when appropriate.
     12
     13== Error Email Notification ==
     14
     15If an SMTP server and email address are [ConfigOptions configured], email notifications on internal errors are sent out, including the requested URL, various other information, and a traceback.
     16
     17== Developer Error Page ==
     18
     19If the [ConfigOptions configuration options] `debug` is enabled, any errors that would normally result in the display of an error page instead result in the display of a developer-oriented page showing details about the error. That page will show information about which Python packages (and their versions) are in use, a fancy traceback, and it will let you drill down into the locals of each frame in the traceback.
     20
     21== Inspecting Template Data ==
     22
     23If the `debug` option is enabled, you will be able to inspect the template data and system information for any page simply by adding the `debug` parameter to the query string (the value of the parameter is ignored, only its presence is checked).
     24