Package com.stripe.exception
Class StripeException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.stripe.exception.StripeException
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
ApiConnectionException,ApiException,AuthenticationException,CardException,EventDataObjectDeserializationException,IdempotencyException,InvalidRequestException,OAuthException,SignatureVerificationException
public abstract class StripeException extends java.lang.Exception- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedStripeException(java.lang.String message, java.lang.String requestId, java.lang.String code, java.lang.Integer statusCode)protectedStripeException(java.lang.String message, java.lang.String requestId, java.lang.String code, java.lang.Integer statusCode, java.lang.Throwable e)Constructs a new Stripe exception with the specified details.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetCode()java.lang.StringgetMessage()Returns a description of the exception, including the HTTP status code and request ID (if applicable).java.lang.StringgetRequestId()java.lang.IntegergetStatusCode()StripeErrorgetStripeError()The error resource returned by Stripe's API that caused the exception.java.lang.StringgetUserMessage()Returns a description of the user facing exceptionvoidsetStripeError(StripeError stripeError)The error resource returned by Stripe's API that caused the exception.
-
-
-
Constructor Detail
-
StripeException
protected StripeException(java.lang.String message, java.lang.String requestId, java.lang.String code, java.lang.Integer statusCode)
-
StripeException
protected StripeException(java.lang.String message, java.lang.String requestId, java.lang.String code, java.lang.Integer statusCode, java.lang.Throwable e)Constructs a new Stripe exception with the specified details.
-
-
Method Detail
-
getMessage
public java.lang.String getMessage()
Returns a description of the exception, including the HTTP status code and request ID (if applicable).- Overrides:
getMessagein classjava.lang.Throwable- Returns:
- a string representation of the exception.
-
getUserMessage
public java.lang.String getUserMessage()
Returns a description of the user facing exception- Returns:
- a string representation of the user facing exception.
-
getStripeError
public StripeError getStripeError()
The error resource returned by Stripe's API that caused the exception.
-
getCode
public java.lang.String getCode()
-
getRequestId
public java.lang.String getRequestId()
-
getStatusCode
public java.lang.Integer getStatusCode()
-
setStripeError
public void setStripeError(StripeError stripeError)
The error resource returned by Stripe's API that caused the exception.
-
-