异常打印

This commit is contained in:
2025-03-11 14:05:44 +08:00
parent 5af5fc689b
commit 592afb7aa1
3 changed files with 8 additions and 5 deletions

View File

@@ -35,7 +35,6 @@ public class CzgControllerAdvice {
@ResponseStatus(HttpStatus.OK)
public CzgResult<Object> errorHandler(Exception ex) {
setErrorLog(ex);
log.error("", ex);
return CzgResult.failure(CzgRespCode.SYSTEM_ERROR.getCode(), ex.getMessage());
}
@@ -99,6 +98,7 @@ public class CzgControllerAdvice {
*/
@ExceptionHandler(CzgException.class)
public CzgResult<Object> handleCzgException(CzgException ex) {
setErrorLog(ex);
return CzgResult.failure(ex.getCode(), ex.getMsg());
}
@@ -124,6 +124,7 @@ public class CzgControllerAdvice {
*/
@ExceptionHandler(ValidateException.class)
public CzgResult<Object> handleValidateException(ValidateException ex) {
setErrorLog(ex);
return CzgResult.failure(CzgRespCode.PARAM_ERROR.getCode(), ex.getMessage());
}