From 1816e2625315940880d445a2a7a06e13c10c2043 Mon Sep 17 00:00:00 2001 From: "junj2.liang" Date: Wed, 24 Aug 2022 16:51:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BC=82=E5=B8=B8=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/sunyard/SydApiException.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/sunyard/SydApiException.java b/src/main/java/com/sunyard/SydApiException.java index 366dc08..ea60670 100644 --- a/src/main/java/com/sunyard/SydApiException.java +++ b/src/main/java/com/sunyard/SydApiException.java @@ -81,6 +81,10 @@ public class SydApiException extends RuntimeException{ case 40000: this.msg = "输入的大数据处理异常"; + case 56300: + this.msg = "证书导入错误"; + case 56307: + this.msg = "证书删除错误"; default: this.msg = "未定义的错误"; @@ -88,14 +92,15 @@ public class SydApiException extends RuntimeException{ } public SydApiException(int retCode) { - super("SydApiException(" + String.format("%04X", retCode) + ")" ); + super("SydApiException(" + "code = "+String.format("%d", retCode) + ")" ); this.retCode = retCode; transMsg(); } - public SydApiException(String msg, int retCode){ - super("SydApiException(" + String.format("%04X", retCode) + ":" + msg +")" ); + public SydApiException(String msg, int ret){ + super("SydApiException(" +"code ="+ String.format(" %d", ret) + " : "+"msg ="+ (null == msg ? "未定义的错误" : msg) +")" ); + this.retCode = ret; if (null == msg || "".equals(msg)){ transMsg(); }else {