扩展异常类

This commit is contained in:
cheney 2022-07-12 09:47:34 +08:00
parent 6cb3072453
commit d9c5e01105

View File

@ -88,13 +88,14 @@ public class SydApiException extends RuntimeException{
} }
public SydApiException(int retCode) { public SydApiException(int retCode) {
super("SydApiException(" + String.format("%04X", retCode) + ")" );
this.retCode = retCode; this.retCode = retCode;
transMsg(); transMsg();
} }
public SydApiException(String msg, int ret){ public SydApiException(String msg, int retCode){
this(ret); super("SydApiException(" + String.format("%04X", retCode) + ":" + msg +")" );
if (null == msg || "".equals(msg)){ if (null == msg || "".equals(msg)){
transMsg(); transMsg();
}else { }else {