Merge pull request #79 from YzwWh9327/main

bugFix:NullPointerException的getMessage默认是null,所以没有必要打印出来,直接打印错误堆栈即可
This commit is contained in:
zongzibinbin
2023-07-03 16:46:11 +08:00
committed by GitHub

View File

@@ -42,7 +42,7 @@ public class GlobalExceptionHandler {
*/ */
@ExceptionHandler(value = NullPointerException.class) @ExceptionHandler(value = NullPointerException.class)
public ApiResult exceptionHandler(NullPointerException e) { public ApiResult exceptionHandler(NullPointerException e) {
log.error("null point exceptionThe reason is:{}", e.getMessage(), e); log.error("null point exceptionThe reason is: ", e);
return ApiResult.fail(CommonErrorEnum.SYSTEM_ERROR); return ApiResult.fail(CommonErrorEnum.SYSTEM_ERROR);
} }