com.gracerun.summermq.exception.MQClientException Maven / Gradle / Ivy
package com.gracerun.summermq.exception;
public class MQClientException extends RuntimeException {
private static final long serialVersionUID = -5758410930844185841L;
private int responseCode;
private String errorMessage;
public MQClientException(String errorMessage, Throwable cause) {
super(errorMessage, cause);
this.responseCode = -1;
this.errorMessage = errorMessage;
}
public MQClientException(int responseCode, String errorMessage) {
super("CODE: " + responseCode + " DESC: " + errorMessage);
this.responseCode = responseCode;
this.errorMessage = errorMessage;
}
public int getResponseCode() {
return responseCode;
}
public MQClientException setResponseCode(final int responseCode) {
this.responseCode = responseCode;
return this;
}
public String getErrorMessage() {
return errorMessage;
}
public void setErrorMessage(final String errorMessage) {
this.errorMessage = errorMessage;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy