更新全局错误,日志输出
This commit is contained in:
parent
dda74d9e65
commit
299c4ee2e6
@ -140,7 +140,7 @@ public class GlobalExceptionHandler {
|
|||||||
@ResponseStatus(HttpStatus.BAD_REQUEST)
|
@ResponseStatus(HttpStatus.BAD_REQUEST)
|
||||||
public R handlerNullPointException(NullPointerException exception) {
|
public R handlerNullPointException(NullPointerException exception) {
|
||||||
String message = exception.getMessage();
|
String message = exception.getMessage();
|
||||||
log.error("全局捕获null错误信息: {}", exception, exception);
|
log.error("全局捕获null错误信息", exception);
|
||||||
return R.fail(message);
|
return R.fail(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -164,7 +164,7 @@ public class GlobalExceptionHandler {
|
|||||||
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
|
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
|
||||||
public R handlerBindException(Exception exception) {
|
public R handlerBindException(Exception exception) {
|
||||||
String message = exception.getMessage();
|
String message = exception.getMessage();
|
||||||
log.error("全局捕获错误信息: {}", exception, exception);
|
log.error("全局捕获错误信息", exception);
|
||||||
return R.fail(message);
|
return R.fail(message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user