1.6 web.error -- Enhanced error handling based on the cgitb module

The web.error module provides enhanced functionality similar to the cgitb module distributed with Python. If an exception is raised the web.error module can catch the error and produce a customised display of the error, the surrounding code and the values of variables in the line which caused the error. It also provides the ability or log errors to a file in various formats.

Using the module you can also provide your own error handling. The example at the end shows you how to create a custom error handler to email error reports to a devloper.

See Also:

cgitb Module Documentation
Find out more about the cgitb module on which this module is based.



Subsections