Chapter 17.6.3. Exception Handling

Analogous to error_handler() and tg_errors, TurboGears provides exception_handler() and tg_exceptions for handling program exceptions.

When no applicable exception handler is defined, the exception is passed to a lower layer (for example, CherryPy).

If having the same handler for both errors and exceptions is desired, you can use errorhandling.register_handler, which is similar to error_handler and exception_handler but without inherent specializations.

Get Rapid Web Applications with TurboGears: Using Python to Create Ajax-Powered Sites now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.