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

com.stripe.exception.StripeException Maven / Gradle / Ivy

package com.stripe.exception;

public abstract class StripeException extends Exception {

	private String requestId;
	private Integer statusCode;

	public StripeException(String message, String requestId, Integer statusCode) {
		super(message, null);
		this.requestId = requestId;
		this.statusCode = statusCode;
	}

	public StripeException(String message, String requestId, Integer statusCode, Throwable e) {
		super(message, e);
		this.statusCode = statusCode;
		this.requestId = requestId;
	}

	private static final long serialVersionUID = 1L;

	public String getRequestId() {
		return requestId;
	}

	public Integer getStatusCode() {
		return statusCode;
	}

	public String toString() {
		String reqIdStr = "";
		if (requestId != null) {
			reqIdStr = "; request-id: " + requestId;
		}
		return super.toString() + reqIdStr;
	}
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy