【优化】优化异常打印,不使用e.printStackTrace方式

This commit is contained in:
xuyuxiang 2023-03-23 14:16:32 +08:00
parent 8f2fa66647
commit 2e87918730

View File

@ -53,10 +53,11 @@ public class GlobalErrorViewController {
} else { } else {
commonResult = CommonResult.error(); commonResult = CommonResult.error();
} }
Exception exception = (Exception) model; if(model instanceof Exception){
log.error(">>> 服务器未知异常:", exception); Exception exception = (Exception) model;
log.error(">>> 服务器未知异常:", exception);
}
} }
return commonResult; return commonResult;
} }
} }