We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d877b48 commit d10ac94Copy full SHA for d10ac94
core/src/main/java/lazy/fast/code/core/exception/GlobalRestExceptionHandler.java
@@ -125,4 +125,10 @@ public ResponseEntity<ResultMsg> exceptionHandler(Exception e) {
125
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(ResultMsg.error());
126
}
127
128
+ @ExceptionHandler(value = BaseUnCheckException.class)
129
+ public ResponseEntity<ResultMsg> baseUnCheckHandler(BaseUnCheckException e) {
130
+ // 其它继承BaseUnCheckException的自定义非受检异常的处理方式
131
+ return ResponseEntity.status(e.getResultMsg().getCode()).body(e.getResultMsg());
132
+ }
133
+
134
0 commit comments