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.
- Timestamp:
-
Jun 26, 2008, 5:20:06 PM (16 years ago)
- Author:
-
cmlenz
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v1
|
v2
|
|
1 | 1 | = Error Pages and Debugging Tools = |
| 2 | |
| 3 | Any 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 | |
| 7 | For 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 | |
| 9 | For example, to customize the error page for `404 Not Found` errors, you'd create a `error/404.html` template in your templates directory. |
| 10 | |
| 11 | The 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 | |
| 15 | If 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 | |
| 19 | If 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 | |
| 23 | If 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 | |