package io.synor.contract;

/**
 * Exception thrown by the Contract SDK.
 */
public class ContractException extends RuntimeException {
    private final Integer statusCode;
    private final String errorCode;

    public ContractException(String message) {
        super(message);
        this.statusCode = null;
        this.errorCode = null;
    }

    public ContractException(String message, Throwable cause) {
        super(message, cause);
        this.statusCode = null;
        this.errorCode = null;
    }

    public ContractException(String message, int statusCode, String errorCode) {
        super(message);
        this.statusCode = statusCode;
        this.errorCode = errorCode;
    }

    public Integer getStatusCode() {
        return statusCode;
    }

    public String getErrorCode() {
        return errorCode;
    }
}
