修改异常类

This commit is contained in:
junj2.liang 2022-09-08 10:33:38 +08:00
parent 1be35ace33
commit 48a1aa828c

View File

@ -102,14 +102,14 @@ public class SydApiException extends RuntimeException{
} }
public SydApiException(int retCode) { public SydApiException(int retCode) {
super("SydApiException(" + "code = "+String.format("%d", retCode) + ")" ); super("SydApiException(" + "code = "+String.format("%04x", retCode) + ")" );
this.retCode = retCode; this.retCode = retCode;
transMsg(); transMsg();
} }
public SydApiException(String msg, int retCode){ public SydApiException(String msg, int retCode){
super("SydApiException(" + String.format("%04X", retCode) + ":" + ( null == msg ? transMsg(retCode) : msg ) + ")" ); super("SydApiException(" + String.format(" %04X", retCode) + ":" + ( null == msg ? transMsg(retCode) : msg ) + ")" );
this.retCode = retCode; this.retCode = retCode;
if (null == msg || "".equals(msg)){ if (null == msg || "".equals(msg)){
transMsg(); transMsg();