更新全局错误,日志输出

This commit is contained in:
谷成伟 2024-11-04 16:32:55 +08:00
parent dda74d9e65
commit 299c4ee2e6

View File

@ -140,7 +140,7 @@ public class GlobalExceptionHandler {
@ResponseStatus(HttpStatus.BAD_REQUEST)
public R handlerNullPointException(NullPointerException exception) {
String message = exception.getMessage();
log.error("全局捕获null错误信息: {}", exception, exception);
log.error("全局捕获null错误信息", exception);
return R.fail(message);
}
@ -164,7 +164,7 @@ public class GlobalExceptionHandler {
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
public R handlerBindException(Exception exception) {
String message = exception.getMessage();
log.error("全局捕获错误信息: {}", exception, exception);
log.error("全局捕获错误信息", exception);
return R.fail(message);
}
}