Open kofrasa opened 12 years ago
This might be a useful half measure. However, the full solution (translate werkzeug traceback so that the interactive debugger shows proper source, variables, etc) has been committed already (see 0b537235fb125f427de7ab4acbbe5f6f6f2a258d). This requires a minor change to werkzeug (see mitsuhiko/werkzeug#206) that hasn't been committed yet.
Sorry to see this issue stalled for so long, this would be such a huge improvement!! Even if just the "half-measure" above were added.
@AnIrishDuck, looks like your PR was just a testcase and changelog entry away from getting merged, but it never happened (see https://github.com/mitsuhiko/werkzeug/pull/206#issuecomment-53995120). Are you still interested in this? And are you, @benselme, still maintaining this project?
I'd be happy to help with the remaining work, but first just want to ask how realistic it is that this will get any attention here and make it into a new release soon.
Thanks!
Just applied the changes from https://github.com/mitsuhiko/werkzeug/pull/206/files to Werkzeug manually and it looks like flask-mako needs no further modification for this to work, amazing!
In that case, if my comment https://github.com/mitsuhiko/werkzeug/pull/206#issuecomment-150024212 gets a response from the Werkzeug maintainers soon, I can volunteer to do the last bit of work to get that merged into Werkzeug, if you don't beat me to it.
I'm not really maintaining anything here but I'll be happy to make a release if it helps !
Thanks @benselme! Fortunately it looks like all it will take before this issue can be closed is mitsuhiko/werkzeug#206 to be merged; flask-mako already has what it needs thanks to @AnIrishDuck's https://github.com/benselme/flask-mako/commit/0b537235fb125f427de7ab4acbbe5f6f6f2a258d. But great you're still able to make new releases! Looks like it's been 2 years since the last release, and since then #8 and #9 were fixed/added, so might be worth making a new release now?
Problem
Currently, all mako exceptions are intercepted and wrapped by the TemplateError. This is not too useful as the mako error messages are suppressed and the stack trace is not provided in an easily readable presentation.
Template errors will typically be dumped onto the browser to allow easy navigation of the call stack
Suggestion
Expose the underlying Mako errors as a callableTemplateError returning the stack trace as HTML. Changes are shown below, with the extra imports