public class EmvException
extends java.lang.Exception
EmvDecoder.decode(String)
).Modifier and Type | Field and Description |
---|---|
static int |
ERR_CODE_DATA_OBJECT_DUPLICATE
Indicates violation of EMVCo requirement 4.3.1.2: There shall be only one occurrence of a data object
with a specific ID under the root and there shall be only one occurrence of a specific ID within a template.
|
static int |
ERR_CODE_DATA_OBJECT_INCOMPLETE
Indicates that a data object in the input is incomplete (value is truncated).
|
static int |
ERR_CODE_DATA_OBJECT_MISSING
Indicates that referenced mandatory data object is missing in the input.
|
static int |
ERR_CODE_DATA_OBJECT_NOT_FOUND
Indicates that a data object structure (ID-Length-Value) was not identified in the input data.
|
static int |
ERR_CODE_DATA_OBJECT_REDUNDANT
Indicates that a data object is redundant (there is another object already present).
|
static int |
ERR_CODE_DATA_OBJECT_UNEXPECTED
Indicates that an unexpected data object was encountered (see cause for details).
|
static int |
ERR_CODE_INCORRECT_CRC
Indicates that the CRC value is incorrect.
|
static int |
ERR_CODE_INVALID_DATA_OBJECT_FORMAT
Indicates that the given data object has invalid format (see cause for details).
|
static int |
ERR_CODE_INVALID_END_OF_QR_CODE
Indicates that the QR code does not end with a 16bit CRC - i.e.
|
static int |
ERR_CODE_INVALID_START_OF_QR_CODE
Indicates that the QR code data does not start with correct Payload Format Indicator value
- i.e.
|
Constructor and Description |
---|
EmvException(java.lang.String message,
int errorCode,
java.lang.Throwable cause)
Creates a new
EmvException object. |
Modifier and Type | Method and Description |
---|---|
int |
getErrorCode()
Provides a numeric error code, which can be used to handle specific errors programmatically.
|
java.lang.String |
getErrorDetails()
Provides a detailed message about the error with an internal cause.
|
public static final int ERR_CODE_INVALID_START_OF_QR_CODE
public static final int ERR_CODE_INVALID_END_OF_QR_CODE
public static final int ERR_CODE_INCORRECT_CRC
public static final int ERR_CODE_DATA_OBJECT_NOT_FOUND
public static final int ERR_CODE_DATA_OBJECT_INCOMPLETE
public static final int ERR_CODE_DATA_OBJECT_UNEXPECTED
public static final int ERR_CODE_DATA_OBJECT_REDUNDANT
public static final int ERR_CODE_INVALID_DATA_OBJECT_FORMAT
public static final int ERR_CODE_DATA_OBJECT_MISSING
public static final int ERR_CODE_DATA_OBJECT_DUPLICATE
public EmvException(java.lang.String message, int errorCode, java.lang.Throwable cause)
EmvException
object.message
- Error message.errorCode
- Error code.cause
- Original cause of the error.public int getErrorCode()
EmvException
class.public java.lang.String getErrorDetails()