修改异常类

This commit is contained in:
junj2.liang 2022-08-24 16:51:02 +08:00
parent 6daefe5d48
commit 1816e26253

View File

@ -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 {