From efdf505e63bce5116854931c9426b15a63be4e40 Mon Sep 17 00:00:00 2001 From: Chopper711 Date: Fri, 21 Feb 2025 11:11:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DServiceException?= =?UTF-8?q?=E7=B1=BB=E4=B8=AD=E5=BC=82=E5=B8=B8=E6=B6=88=E6=81=AF=E6=8B=BC?= =?UTF-8?q?=E6=8E=A5=E9=97=AE=E9=A2=98=20(master)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改ServiceException类中默认异常消息的设置方式,使用 ResultCode.ERROR.message()代替DEFAULT_MESSAGE。 --- .../main/java/cn/lili/common/exception/ServiceException.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/framework/src/main/java/cn/lili/common/exception/ServiceException.java b/framework/src/main/java/cn/lili/common/exception/ServiceException.java index feb98e6da..754aec2a3 100644 --- a/framework/src/main/java/cn/lili/common/exception/ServiceException.java +++ b/framework/src/main/java/cn/lili/common/exception/ServiceException.java @@ -15,12 +15,11 @@ public class ServiceException extends RuntimeException { private static final long serialVersionUID = 3447728300174142127L; - public static final String DEFAULT_MESSAGE = "网络错误,请稍后重试!"; /** * 异常消息 */ - private String msg = DEFAULT_MESSAGE; + private String msg = ResultCode.ERROR.message(); /** * 错误码