|
@@ -35,8 +35,10 @@ def catch_errors(func): |
|
|
try: |
|
|
try: |
|
|
return func(*args, **kwargs) |
|
|
return func(*args, **kwargs) |
|
|
except TemplateError as exc: |
|
|
except TemplateError as exc: |
|
|
|
|
|
app.logger.error(u"Caught exception:\n{0}".format(exc.text)) |
|
|
return render_template("error.mako", traceback=exc.text) |
|
|
return render_template("error.mako", traceback=exc.text) |
|
|
except Exception: |
|
|
except Exception: |
|
|
|
|
|
app.logger.exception(u"Caught exception:") |
|
|
return render_template("error.mako", traceback=format_exc()) |
|
|
return render_template("error.mako", traceback=format_exc()) |
|
|
return inner |
|
|
return inner |
|
|
|
|
|
|
|
|