errorcode static 사용
This commit is contained in:
@@ -27,7 +27,7 @@ public abstract class Command implements Serializable {
|
|||||||
private HashMap<String,String> errorCode ;
|
private HashMap<String,String> errorCode ;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
HashMap<String,String> errorCode = new HashMap<String,String>();
|
errorCode = new HashMap<String,String>();
|
||||||
errorCode.put("RECEAIMCM001", "Command 이름[{1}] 유효하지 않은 파라메터 타입 - {2}");
|
errorCode.put("RECEAIMCM001", "Command 이름[{1}] 유효하지 않은 파라메터 타입 - {2}");
|
||||||
errorCode.put("RECEAIMCM002", "Command 이름[{1}] execute 메소드 실행중 에러가 발생 - {2}");
|
errorCode.put("RECEAIMCM002", "Command 이름[{1}] execute 메소드 실행중 에러가 발생 - {2}");
|
||||||
}
|
}
|
||||||
@@ -94,10 +94,9 @@ public abstract class Command implements Serializable {
|
|||||||
else{
|
else{
|
||||||
msgArgs[1] = cause.getMessage();
|
msgArgs[1] = cause.getMessage();
|
||||||
}
|
}
|
||||||
if(this.errorCode != null)
|
String msg = makeMessage((String)errorCode.get(rspErrorCode),msgArgs) ;
|
||||||
return makeMessage((String)errorCode.get(rspErrorCode),msgArgs) ;
|
|
||||||
else
|
return msg;
|
||||||
return "error";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static String makeMessage(String msg, String[] args) {
|
protected static String makeMessage(String msg, String[] args) {
|
||||||
|
|||||||
Reference in New Issue
Block a user