public class Error
extends java.lang.Exception
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ERROR_CATEGORY_API
The constant string representing the error category API Error.
|
static java.lang.String |
ERROR_CATEGORY_CARD_READER
The constant string representing the error category Card reader Error.
|
static java.lang.String |
ERROR_CATEGORY_SDK
The constant string representing the error category SDK Error.
|
static java.lang.String |
ERROR_DOMAIN_API
The constant ERROR_DOMAIN_API
|
static java.lang.String |
ERROR_DOMAIN_SDK
The constant ERROR_DOMAIN_SDK
|
Constructor and Description |
---|
Error(java.lang.Integer errorCode,
java.lang.String errorDomain,
java.lang.String errorCategory,
java.lang.String errorDescription)
\internal
Instantiates a new error.
|
Error(java.lang.Integer errorCode,
java.lang.String errorDomain,
java.lang.String errorCategory,
java.lang.String errorDescription,
java.lang.Exception innerException)
\internal
Instantiates a new error.
|
Error(org.json.JSONObject errorResponse,
java.lang.Throwable throwable)
\internal
Instantiates a new error from a WePay server api response.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
static Error |
getCardBlockedError()
\internal
Instantiates card blocked error.
|
static Error |
getCardDeclinedByIssuerError()
\internal
Instantiates card declined by issuer error.
|
static Error |
getCardNotSupportedError()
\internal
Instantiates a card not supported error.
|
static Error |
getCardReaderBatteryTooLowError()
\internal
Instantiates a card reader battery too low error.
|
static Error |
getCardReaderErrorWithMessage(java.lang.String errorMessage)
\internal
Instantiates a generic card reader error with the provided message.
|
static Error |
getCardReaderGeneralError()
\internal
Instantiates a card reader general error.
|
static Error |
getCardReaderGeneralErrorWithMessage(java.lang.String errorDescription) |
static Error |
getCardReaderInitializationError()
\internal
Instantiates a card reader initialization error.
|
static Error |
getCardReaderNotConnectedError()
\internal
Instantiates a card reader not connected error.
|
static Error |
getCardReaderStatusError(java.lang.String message)
\internal
Instantiates a card reader status error.
|
static Error |
getCardReaderTimeoutError()
\internal
Instantiates a card reader timeout error.
|
static Error |
getCardReaderUnableToConnectError()
\internal
Instantiates an unable to connect to card reader error.
|
static Error |
getCardReaderUnknownError()
\internal
Instantiates a card reader unknown error.
|
static Error |
getDeclinedByCardError()
\internal
Instantiates declined by card error.
|
static Error |
getEmvTransactionErrorWithMessage(java.lang.String errorMessage)
\internal
Instantiates an EMV transaction error with the provided message.
|
java.lang.String |
getErrorCategory()
Gets the error category.
|
java.lang.Integer |
getErrorCode()
Gets the error code.
|
java.lang.String |
getErrorDescription()
Gets the error description.
|
java.lang.String |
getErrorDomain()
Gets the error domain.
|
static Error |
getErrorWithCardReaderResponseData(java.util.Map<com.roam.roamreaderunifiedapi.constants.Parameter,java.lang.Object> data) |
static Error |
getFailedToGetBatteryLevelError()
\internal
Instantiates failed to get battery level error.
|
java.lang.Exception |
getInnerException()
Gets the inner exception.
|
static Error |
getInvalidApplicationIdError()
\internal
Instantiates invalid application id error.
|
static Error |
getInvalidCardDataError()
\internal
Instantiates a invalid card data error.
|
static Error |
getInvalidCardReaderSelectionError()
\internal
Instantiates a card reader selection error.
|
static Error |
getInvalidSignatureImageError(java.lang.Exception e)
\internal
Instantiates a invalid signature image error.
|
static Error |
getInvalidTransactionAccountIDError()
\internal
Instantiates invalid transaction account ID error.
|
static Error |
getInvalidTransactionAmountError()
\internal
Instantiates invalid transaction amount error.
|
static Error |
getInvalidTransactionCurrencyCodeError()
\internal
Instantiates invalid transaction currency code error.
|
static Error |
getIssuerUnreachableError()
\internal
Instantiates issuer unreachable error.
|
java.lang.String |
getMessage() |
static Error |
getNameNotFoundError()
\internal
Instantiates a name not found error.
|
static Error |
getNoDataReturnedError()
\internal
Instantiates a no data returned error.
|
static Error |
getPaymentMethodCannotBeTokenizedError()
\internal
Instantiates payment method cannot be tokenized error.
|
static Error |
getTransactionInfoNotProvidedError()
\internal
Instantiates transaction info not provided error.
|
int |
hashCode() |
java.lang.String |
toString() |
public static final java.lang.String ERROR_DOMAIN_API
public static final java.lang.String ERROR_DOMAIN_SDK
public static final java.lang.String ERROR_CATEGORY_CARD_READER
public static final java.lang.String ERROR_CATEGORY_API
public static final java.lang.String ERROR_CATEGORY_SDK
public Error(java.lang.Integer errorCode, java.lang.String errorDomain, java.lang.String errorCategory, java.lang.String errorDescription, java.lang.Exception innerException)
errorCode
- the error codeerrorDomain
- the error domainerrorCategory
- the error categoryerrorDescription
- the error descriptioninnerException
- the inner exception that caused the errorpublic Error(java.lang.Integer errorCode, java.lang.String errorDomain, java.lang.String errorCategory, java.lang.String errorDescription)
errorCode
- the error codeerrorDomain
- the error domainerrorCategory
- the error categoryerrorDescription
- the error descriptionpublic Error(org.json.JSONObject errorResponse, java.lang.Throwable throwable)
errorResponse
- the error response from the WePay serverthrowable
- the throwable generated by the api callpublic java.lang.String getErrorCategory()
public java.lang.String getErrorDomain()
public java.lang.String getErrorDescription()
public java.lang.Integer getErrorCode()
public java.lang.Exception getInnerException()
public java.lang.String getMessage()
getMessage
in class java.lang.Throwable
public java.lang.String toString()
toString
in class java.lang.Throwable
public static Error getCardReaderInitializationError()
public static Error getCardReaderTimeoutError()
public static Error getCardReaderErrorWithMessage(java.lang.String errorMessage)
errorMessage
- the message used in the errorpublic static Error getInvalidCardDataError()
public static Error getCardNotSupportedError()
public static Error getEmvTransactionErrorWithMessage(java.lang.String errorMessage)
errorMessage
- the message used in the errorpublic static Error getInvalidApplicationIdError()
public static Error getDeclinedByCardError()
public static Error getCardBlockedError()
public static Error getIssuerUnreachableError()
public static Error getNoDataReturnedError()
public static Error getCardDeclinedByIssuerError()
public static Error getInvalidTransactionAmountError()
public static Error getInvalidTransactionCurrencyCodeError()
public static Error getInvalidTransactionAccountIDError()
public static Error getTransactionInfoNotProvidedError()
public static Error getPaymentMethodCannotBeTokenizedError()
public static Error getFailedToGetBatteryLevelError()
public static Error getCardReaderNotConnectedError()
public static Error getCardReaderGeneralError()
public static Error getCardReaderUnknownError()
public static Error getCardReaderStatusError(java.lang.String message)
message
- the messagepublic static Error getInvalidSignatureImageError(java.lang.Exception e)
e
- the exception generated during image validationpublic static Error getNameNotFoundError()
public static Error getInvalidCardReaderSelectionError()
public static Error getCardReaderBatteryTooLowError()
public static Error getCardReaderUnableToConnectError()
public static Error getErrorWithCardReaderResponseData(java.util.Map<com.roam.roamreaderunifiedapi.constants.Parameter,java.lang.Object> data)
public static Error getCardReaderGeneralErrorWithMessage(java.lang.String errorDescription)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object