|
@@ -30,9 +30,15 @@ import javax.validation.ConstraintViolationException;
|
30
|
30
|
@RestControllerAdvice
|
31
|
31
|
@Slf4j
|
32
|
32
|
public class ExceptionHandlerAdvice {
|
33
|
|
- @ExceptionHandler({IllegalArgumentException.class, CustomException.class})
|
|
33
|
+ @ExceptionHandler({CustomException.class})
|
34
|
34
|
@ResponseBody
|
35
|
|
- public BaseResult parameterException(RuntimeException exception) {
|
|
35
|
+ public BaseResult customException(RuntimeException exception) {
|
36
|
36
|
return BaseResult.failure(ResultCode.FAIL,exception.getMessage());
|
37
|
37
|
}
|
|
38
|
+
|
|
39
|
+ @ExceptionHandler({IllegalArgumentException.class})
|
|
40
|
+ @ResponseBody
|
|
41
|
+ public BaseResult parameterException(RuntimeException exception) {
|
|
42
|
+ return BaseResult.failure(ResultCode.ILLEGALARGUMENT);
|
|
43
|
+ }
|
38
|
44
|
}
|