修改异常类

This commit is contained in:
junj2.liang 2022-08-24 16:46:24 +08:00
parent d34d5ff8e0
commit b2d5103176

View File

@ -81,6 +81,10 @@ public class SydApiException extends RuntimeException{
case 40000: case 40000:
this.msg = "输入的大数据处理异常"; this.msg = "输入的大数据处理异常";
case 56300:
this.msg = "证书导入错误";
case 56307:
this.msg = "证书删除错误";
default: default:
this.msg = "未定义的错误"; this.msg = "未定义的错误";
@ -88,13 +92,15 @@ public class SydApiException extends RuntimeException{
} }
public SydApiException(int retCode) { public SydApiException(int retCode) {
super("SydApiException(" + "code = "+String.format("%d", retCode) + ")" );
this.retCode = retCode; this.retCode = retCode;
transMsg(); transMsg();
} }
public SydApiException(String msg, int ret){ public SydApiException(String msg, int ret){
this(ret); super("SydApiException(" +"code ="+ String.format(" %d", ret) + " : "+"msg ="+ (null == msg ? "未定义的错误" : msg) +")" );
this.retCode = ret;
if (null == msg || "".equals(msg)){ if (null == msg || "".equals(msg)){
transMsg(); transMsg();
}else { }else {