正在显示
1 个修改的文件
包含
5 行增加
和
0 行删除
@@ -23,6 +23,11 @@ public class CustomException extends RuntimeException { | @@ -23,6 +23,11 @@ public class CustomException extends RuntimeException { | ||
23 | this.message = message; | 23 | this.message = message; |
24 | } | 24 | } |
25 | 25 | ||
26 | + public CustomException(CustomExceptionType exceptionTypeEnum) { | ||
27 | + this.code = exceptionTypeEnum.getCode(); | ||
28 | + this.message = exceptionTypeEnum.getMsg(); | ||
29 | + } | ||
30 | + | ||
26 | public String getCode() { | 31 | public String getCode() { |
27 | return code; | 32 | return code; |
28 | } | 33 | } |
-
请 注册 或 登录 后发表评论