Commit 69c97004 by 陶光胜

init

parent cbb807e4
......@@ -31,6 +31,7 @@ public class GlobalExceptionHandler {
@ExceptionHandler(RuntimeException.class)
public RestResponse runtimeException(RuntimeException e){
logger.warn("异常:{}", e);
return RestResponse.failure(ErrorCode.SYSTEM_ERROR.getCode(), "系统异常,请联系管理员", e.getMessage());
}
......@@ -38,6 +39,7 @@ public class GlobalExceptionHandler {
@ResponseBody
@ExceptionHandler(CommonException.class)
public RestResponse customException(CommonException e) {
logger.warn("异常:{}", e);
return getRestResponse(e.getErrorCode(), e.getMessage());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment