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 protected
StripeException(java.lang.String message, java.lang.String requestId, java.lang.String code, java.lang.Integer statusCode)
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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getCode()
java.lang.String
getMessage()
Returns a description of the exception, including the HTTP status code and request ID (if applicable).java.lang.String
getRequestId()
java.lang.Integer
getStatusCode()
StripeError
getStripeError()
The error resource returned by Stripe's API that caused the exception.java.lang.String
getUserMessage()
Returns a description of the user facing exceptionvoid
setStripeError(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:
getMessage
in 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.
-
-