瀏覽代碼

Log user-facing exceptions in app log.

pull/24/head
Ben Kurtovic 9 年之前
父節點
當前提交
8321a22f05
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. +2
    -0
      app.fcgi

+ 2
- 0
app.fcgi 查看文件

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



Loading…
取消
儲存