fix: 修复SQL异常详情没有输出到控制台的bug

This commit is contained in:
Captain.B 2021-03-18 15:22:17 +08:00
parent 9d5d60c99a
commit 0109e0a848
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ public class RestControllerExceptionHandler {
@ExceptionHandler(SQLException.class) @ExceptionHandler(SQLException.class)
public ResultHolder sqlExceptionHandler(HttpServletRequest request, HttpServletResponse response, SQLException e) { public ResultHolder sqlExceptionHandler(HttpServletRequest request, HttpServletResponse response, SQLException e) {
response.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value()); response.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value());
LogUtil.error(e); LogUtil.error(e.getMessage(), e);
return ResultHolder.error("SQL error happened, please check logs."); return ResultHolder.error("SQL error happened, please check logs.");
} }