All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.gracerun.summermq.exception.MQClientException Maven / Gradle / Ivy

There is a newer version: 1.0.6
Show newest version

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