This commit is contained in:
parent
19d743e214
commit
299f2d4f85
|
@ -51,6 +51,12 @@ public class ServerExceptionHandler {
|
||||||
return Result.error(ErrorCode.FORBIDDEN);
|
return Result.error(ErrorCode.FORBIDDEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ExceptionHandler(IllegalArgumentException.class)
|
||||||
|
public Result<String> handleIllegalArgumentException(Exception ex) {
|
||||||
|
|
||||||
|
return Result.error(ex.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
@ExceptionHandler(Exception.class)
|
@ExceptionHandler(Exception.class)
|
||||||
public Result<String> handleException(Exception ex) {
|
public Result<String> handleException(Exception ex) {
|
||||||
log.error(ex.getMessage(), ex);
|
log.error(ex.getMessage(), ex);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user