From e26c98bd7cfde538096d74ea9019e2128b5fe313 Mon Sep 17 00:00:00 2001 From: chenjiahe <763432473@qq.com> Date: 星期二, 16 五月 2023 10:39:24 +0800 Subject: [PATCH] 优化 --- src/main/java/com/platform/exception/PlatTipsException.java | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/platform/exception/PlatTipsException.java b/src/main/java/com/platform/exception/PlatTipsException.java index 5008c7d..13594f9 100644 --- a/src/main/java/com/platform/exception/PlatTipsException.java +++ b/src/main/java/com/platform/exception/PlatTipsException.java @@ -7,16 +7,31 @@ */ public class PlatTipsException extends RuntimeException { + /**鎬荤紪鐮�*/ private String code; + /**瀛愮紪鐮�*/ + private String subCode = "100"; public PlatTipsException( String code,String message) { super(message); this.code = code; } + public PlatTipsException( String code,String subCode,String message) { + super(message); + this.code = code; + this.subCode = subCode; + } + public PlatTipsException( String code,String message, Throwable cause) { super(message, cause); this.code = code; + } + + public PlatTipsException( String code,String subCode,String message, Throwable cause) { + super(message, cause); + this.code = code; + this.subCode = subCode; } public PlatTipsException(String code,Throwable cause) { @@ -33,4 +48,12 @@ public void setCode(String code) { this.code = code; } + + public String getSubCode() { + return subCode; + } + + public void setSubCode(String subCode) { + this.subCode = subCode; + } } -- Gitblit v1.8.0