errorcode static 사용

This commit is contained in:
2210045
2026-02-26 10:57:16 +09:00
parent eff2a81745
commit 5c14a7ce0b
@@ -27,7 +27,7 @@ public abstract class Command implements Serializable {
private HashMap<String,String> errorCode ;
static {
HashMap<String,String> errorCode = new HashMap<String,String>();
errorCode = new HashMap<String,String>();
errorCode.put("RECEAIMCM001", "Command 이름[{1}] 유효하지 않은 파라메터 타입 - {2}");
errorCode.put("RECEAIMCM002", "Command 이름[{1}] execute 메소드 실행중 에러가 발생 - {2}");
}
@@ -94,10 +94,9 @@ public abstract class Command implements Serializable {
else{
msgArgs[1] = cause.getMessage();
}
if(this.errorCode != null)
return makeMessage((String)errorCode.get(rspErrorCode),msgArgs) ;
else
return "error";
String msg = makeMessage((String)errorCode.get(rspErrorCode),msgArgs) ;
return msg;
}
protected static String makeMessage(String msg, String[] args) {