mitsuhiko/werkzeug — pull request #206 by AnIrishDuck (2012-07-23 22:12:53+00:00)
Title: Allow exceptions to modify debugging tracebacks.

Extremely simple, checks for a "exc.werkzeug_debug_traceback" method and invokes that instead of the Traceback constructor when the corresponding exception is raised. This is useful for packages (like Mako) that autogenerate code and need to separately annotate tracebacks to translate source lines.

For an example of this project's usefulness, see this commit in the flask-mako extension: AnIrishDuck/flask-mako@ea6a05171caba6ec2e094467cb8087a148e391e3. This commit vastly improves the debugging environment when errors occur inside Mako templates.