fix:修改异常处理
This commit is contained in:
@@ -97,9 +97,7 @@ public class ControllerAdvice {
|
||||
*/
|
||||
@ExceptionHandler(value = RuntimeException.class)
|
||||
public Result<String> runtimeException(RuntimeException e){
|
||||
if (!e.getMessage().isEmpty()){
|
||||
log.error("运行时异常 消息为: {}", e.getMessage());
|
||||
}
|
||||
log.error("运行时异常:{}", e.getMessage());
|
||||
if (e instanceof RRException){
|
||||
RRException rrException = (RRException) e;
|
||||
return Result.error(rrException.getCode(), rrException.getMsg());
|
||||
|
||||
Reference in New Issue
Block a user