package kz.konturai.parser.exception;

/**
 * Исключение, выбрасываемое когда Facebook access token истек
 */
public class FacebookTokenExpiredException extends RuntimeException {

    private final String errorMessage;
    private final int errorCode;
    private final int errorSubcode;

    public FacebookTokenExpiredException(String message, String errorMessage, int errorCode, int errorSubcode) {
        super(message);
        this.errorMessage = errorMessage;
        this.errorCode = errorCode;
        this.errorSubcode = errorSubcode;
    }

    public FacebookTokenExpiredException(String message, String errorMessage, int errorCode, int errorSubcode,
            Throwable cause) {
        super(message, cause);
        this.errorMessage = errorMessage;
        this.errorCode = errorCode;
        this.errorSubcode = errorSubcode;
    }

    public String getErrorMessage() {
        return errorMessage;
    }

    public int getErrorCode() {
        return errorCode;
    }

    public int getErrorSubcode() {
        return errorSubcode;
    }
}
