Package com.thalesgroup.gemalto.d1
Class D1Exception
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.thalesgroup.gemalto.d1.D1Exception
-
- All Implemented Interfaces:
Serializable
public final class D1Exception extends Exception
The D1 exception.When an error occurs and support is required, it is recommended to include
getErrorCode()as well as the stack trace of error in the report.- Since:
- 1.0.0
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classD1Exception.ErrorCodeD1 error code.
-
Constructor Summary
Constructors Constructor Description D1Exception(D1Exception.ErrorCode errorCode)Constructs a D1Exception with the specific error code.D1Exception(D1Exception.ErrorCode errorCode, Throwable cause)Constructs a D1Exception with an error code and the cause.D1Exception(D1Exception.ErrorCode errorCode, Throwable cause, int causeErrorCode)Constructs a D1Exception with the error code, cause and the cause's error code.D1Exception(D1Exception.ErrorCode errorCode, Throwable cause, int causeErrorCode, String causeErrorMessage)Constructs a D1Exception with the error code, cause and the cause's error code.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description D1Exception.ErrorCodegetErrorCode()Retrieves theD1Exception.ErrorCodeof this exception.StringgetMessage()Retrieves the underlying error name, error code, cause error code and cause error message.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
D1Exception
public D1Exception(@NonNull D1Exception.ErrorCode errorCode)
Constructs a D1Exception with the specific error code.- Parameters:
errorCode- The error code of this exception.
-
D1Exception
public D1Exception(@NonNull D1Exception.ErrorCode errorCode, @NonNull Throwable cause)
Constructs a D1Exception with an error code and the cause.- Parameters:
errorCode- The error code.cause- The cause.
-
D1Exception
public D1Exception(@NonNull D1Exception.ErrorCode errorCode, @NonNull Throwable cause, int causeErrorCode, String causeErrorMessage)
Constructs a D1Exception with the error code, cause and the cause's error code.- Parameters:
errorCode- The D1 error code.cause- The cause of the exception.causeErrorCode- The error code of the cause.causeErrorMessage- The error message of the cause.
-
D1Exception
public D1Exception(@NonNull D1Exception.ErrorCode errorCode, @NonNull Throwable cause, int causeErrorCode)
Constructs a D1Exception with the error code, cause and the cause's error code.- Parameters:
errorCode- The D1 error code.cause- The cause of the exception.causeErrorCode- The error code of the cause.
-
-
Method Detail
-
getMessage
public String getMessage()
Retrieves the underlying error name, error code, cause error code and cause error message. The error message is in <D1ErrorName> [<D1-ErrorCode>] (<CauseErrorCode>) <CauseErrorMessage> format where (CauseErrorCode) and <CauseErrorMessage> are optional.- Overrides:
getMessagein classThrowable- Returns:
- the formatted error message.
- Since:
- 3.4.0
-
getErrorCode
@NonNull public D1Exception.ErrorCode getErrorCode()
Retrieves theD1Exception.ErrorCodeof this exception.- Returns:
- The
D1Exception.ErrorCode.
-
-