From 3bb5397c4968a114a035124d5a0343c6fea51e99 Mon Sep 17 00:00:00 2001 From: ZhouXY108 Date: Sun, 10 Sep 2023 16:47:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20UnsupportedMenuTypeExcepti?= =?UTF-8?q?on=20=E7=9A=84=E9=94=99=E8=AF=AF=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- err_code.json | 4 ++++ .../common/exception/UnsupportedMenuTypeException.java | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/err_code.json b/err_code.json index 0752942..809dc81 100644 --- a/err_code.json +++ b/err_code.json @@ -222,6 +222,10 @@ { "code": 4040201, "description": "不支持的 PrincipalType" + }, + { + "code": 4040209, + "description": "不支持的菜单类型" } ] }, diff --git a/plusone-system/plusone-system-application/src/main/java/xyz/zhouxy/plusone/system/application/common/exception/UnsupportedMenuTypeException.java b/plusone-system/plusone-system-application/src/main/java/xyz/zhouxy/plusone/system/application/common/exception/UnsupportedMenuTypeException.java index c2e047c..ff07cbf 100644 --- a/plusone-system/plusone-system-application/src/main/java/xyz/zhouxy/plusone/system/application/common/exception/UnsupportedMenuTypeException.java +++ b/plusone-system/plusone-system-application/src/main/java/xyz/zhouxy/plusone/system/application/common/exception/UnsupportedMenuTypeException.java @@ -7,11 +7,13 @@ public class UnsupportedMenuTypeException extends InvalidInputException { @java.io.Serial private static final long serialVersionUID = -769169844015637730L; + public static final String ERROR_CODE = "4040209"; + public UnsupportedMenuTypeException() { this("不支持的菜单类型"); } public UnsupportedMenuTypeException(String message) { - super(message); + super(ERROR_CODE, message); } }