Skip to content

Commit

Permalink
🔊 异常输出
Browse files Browse the repository at this point in the history
有很多朋友反馈该提示:“未知异常,请联系管理员”,但是不知道什么异常导致的,这里把异常打印到控制台上,方便调试。
  • Loading branch information
newbee-mall authored Jan 12, 2020
1 parent 449d83c commit 5d59c31
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public Object handleException(Exception e, HttpServletRequest req) {
if (e instanceof NewBeeMallException) {
result.setMessage(e.getMessage());
} else {
e.printStackTrace();
result.setMessage("未知异常,请联系管理员");
}
//检查请求是否为ajax, 如果是 ajax 请求则返回 Result json串, 如果不是 ajax 请求则返回 error 视图
Expand Down

0 comments on commit 5d59c31

Please sign in to comment.