fix:修改异常处理

This commit is contained in:
2025-01-15 17:34:43 +08:00
parent 7b0a2a98cd
commit 8fb13e026b
2 changed files with 4 additions and 6 deletions

View File

@@ -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());