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

jp.webpay.exception.ApiConnectionException Maven / Gradle / Ivy

There is a newer version: 1.2.1
Show newest version
package jp.webpay.exception;

import lombok.Getter;

public class ApiConnectionException extends WebPayException {
    @Getter
    private final Throwable cause;

    public ApiConnectionException(String message) {
        super(message);
        cause = null;
    }

    public ApiConnectionException(Throwable cause) {
        super("ApiConnectionException caused by " + cause.getMessage());
        this.cause = cause;
    }

    public static ApiConnectionException jsonException(String json) {
        return new ApiConnectionException("Response JSON is broken. Please check connection status and retry.\n" + json);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy