optimize: 优化异常说明

This commit is contained in:
曹鹏飞 2024-06-03 10:01:14 +08:00
parent 39f9cdae60
commit c5cd02bcc7
1 changed files with 2 additions and 2 deletions

View File

@ -105,7 +105,7 @@ public class BaseGlobalExceptionHandle {
public ResultVO<String> handleDataIntegrityViolationException(DataIntegrityViolationException e) {
log.error(e.getMessage(), e);
// return ResultVO.error("字段太长,超出数据库字段的长度");
return ResultVO.error("数据不完整");
return ResultVO.error("数据库异常");
}
@ExceptionHandler(value = SQLException.class)
@ -129,7 +129,7 @@ public class BaseGlobalExceptionHandle {
public ResultVO<String> handleDataAccessException(BadSqlGrammarException e) {
log.error(e.getMessage(),e);
//throw new NflgBusinessException(STATE.Error, "sql 语法错误,系统错误,请联系管理员");
return ResultVO.error("sql 语法错误,系统错误,请联系管理员");
return ResultVO.error("sql 语法错误,请联系管理员");
}
@ExceptionHandler(value = MethodArgumentNotValidException.class)