Change-Id: I005836cc13d7c8fbd9337ce35f5755a13e8150b5
public class CommandErrorException extends Exception {
private static final long serialVersionUID = 1L;
+ private ErrorMessageType errorType;
public CommandErrorException() {
super();
public CommandErrorException(Throwable t) {
super(t);
}
+
+ public CommandErrorException(ErrorMessageType errorType, String msg) {
+ super(msg);
+ this.errorType = errorType;
+ }
+
+ public ErrorMessageType getErrorType() {
+ return this.errorType;
+ }
}
throw new CommandErrorException(PkgcmdErrorMessages.ERROR_UNKNOWN);
}
else if (!ErrorMessageType.SUCCESS.equals(errorType)) {
- throw new CommandErrorException(getMessage());
+ throw new CommandErrorException(errorType, getMessage());
}
}