ApiNotPrintException 改为 CzgException
This commit is contained in:
@@ -45,15 +45,6 @@ public class CzgControllerAdvice {
|
||||
return CzgResult.failure(CzgRespCode.NOT_LOGIN.getCode(), CzgRespCode.NOT_LOGIN + ":" + ex.getMessage());
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@ExceptionHandler(value = ApiNotPrintException.class)
|
||||
@ResponseStatus(HttpStatus.OK)
|
||||
public CzgResult<Object> apiNotPrintErrorHandler(ApiNotPrintException ex) {
|
||||
// setErrorLog(ex);
|
||||
log.error("校验异常:{}", ex.getMessage());
|
||||
return CzgResult.failure(ex.getMessage());
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@ExceptionHandler(value = HttpMessageNotReadableException.class)
|
||||
@ResponseStatus(HttpStatus.OK)
|
||||
@@ -91,7 +82,8 @@ public class CzgControllerAdvice {
|
||||
*/
|
||||
@ExceptionHandler(CzgException.class)
|
||||
public CzgResult<Object> handleCzgException(CzgException ex) {
|
||||
setErrorLog(ex);
|
||||
// setErrorLog(ex);
|
||||
log.error("CzgException校验异常:{}", ex.getMessage());
|
||||
return CzgResult.failure(ex.getCode(), ex.getMsg());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user