Class TPCSDKException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.thalesgroup.tpcsdk.manager.exception.TPCSDKException
-
- All Implemented Interfaces:
Serializable
public class TPCSDKException extends Exception
TPCSDKException is generic exception class to handle all TPC errors TPCSDKException providesexceptionTypethrough which called will get exact reason for error- Since:
- 1.0
- Version:
- 1.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TPCSDKException(TPCSDKExceptionType exceptionType)TPCSDKException(TPCSDKExceptionType exceptionType, int errorCode)TPCSDKException(TPCSDKExceptionType exceptionType, int errorCode, String xRequestId)TPCSDKException(TPCSDKExceptionType exceptionType, int errorCode, Throwable cause)TPCSDKException(TPCSDKExceptionType exceptionType, String xRequestId)TPCSDKException(TPCSDKExceptionType exceptionType, StringBuilder extraErrorMsg)TPCSDKException(TPCSDKExceptionType exceptionType, String extraMessage, Object additionalData)Creates an exception with an extra diagnostic message and optional structured data.TPCSDKException(TPCSDKExceptionType exceptionType, Throwable cause)TPCSDKException(TPCSDKExceptionType exceptionType, Throwable cause, String xRequestId)TPCSDKException(String message)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectgetAdditionalData()Returns optional structured data attached to this exception by the SDK.TPCSDKExceptionTypegetExceptionType()StringgetRequestId()Provides id of the failed server request-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
TPCSDKException
public TPCSDKException(String message)
-
TPCSDKException
public TPCSDKException(TPCSDKExceptionType exceptionType)
-
TPCSDKException
public TPCSDKException(TPCSDKExceptionType exceptionType, StringBuilder extraErrorMsg)
-
TPCSDKException
public TPCSDKException(TPCSDKExceptionType exceptionType, String xRequestId)
-
TPCSDKException
public TPCSDKException(TPCSDKExceptionType exceptionType, Throwable cause)
-
TPCSDKException
public TPCSDKException(TPCSDKExceptionType exceptionType, Throwable cause, String xRequestId)
-
TPCSDKException
public TPCSDKException(TPCSDKExceptionType exceptionType, int errorCode, Throwable cause)
-
TPCSDKException
public TPCSDKException(TPCSDKExceptionType exceptionType, int errorCode)
-
TPCSDKException
public TPCSDKException(TPCSDKExceptionType exceptionType, int errorCode, String xRequestId)
-
TPCSDKException
public TPCSDKException(TPCSDKExceptionType exceptionType, String extraMessage, Object additionalData)
Creates an exception with an extra diagnostic message and optional structured data.This constructor is reserved for use by TPC SDK internals. Integrators should consume the data through
getAdditionalData().- Parameters:
exceptionType- error typeextraMessage- appended to the type's message; may benulladditionalData- structured payload retrievable viagetAdditionalData(); may benull
-
-
Method Detail
-
getRequestId
public String getRequestId()
Provides id of the failed server request- Returns:
- value of x-request-id or null in case of local exception
-
getExceptionType
public TPCSDKExceptionType getExceptionType()
-
getAdditionalData
public Object getAdditionalData()
Returns optional structured data attached to this exception by the SDK.For Google Pay UPP provisioning errors the value is a
GoogleProvisioningResultinstance when aPushTokenizeResultwas available in the Activity result.- Returns:
- additional data object, or
nullif none was set
-
-