globalplatform/error.h File Reference
#include "unicode.h"
Go to the source code of this file.
Detailed Description
This file defines error structures and functions.
Define Documentation
#define OPGP_ERROR_CHECK |
( |
status |
|
) |
status.errorStatus |
Returns non zero if an error happened.
- Parameters:
-
#define OPGP_ERROR_CREATE_ERROR |
( |
status, |
|
|
code, |
|
|
message |
|
) |
|
Value:status.errorStatus = OPGP_ERROR_STATUS_FAILURE; \
status.errorCode = code; \
_tcsncpy(status.errorMessage, message, ERROR_MESSAGE_LENGTH); status.errorMessage[ERROR_MESSAGE_LENGTH] = _T('\0')
Sets the status in case of an error.
- Parameters:
-
| status | Must be the OPGP_ERROR_STATUS structure. |
| code | Is the error code of the failed function. |
| message | Is the associated error message. |
#define OPGP_ERROR_CREATE_NO_ERROR |
( |
status |
|
) |
|
Value:status.errorStatus = OPGP_ERROR_STATUS_SUCCESS; status.errorCode = 0; \
_tcsncpy(status.errorMessage, _T("Success"), ERROR_MESSAGE_LENGTH); status.errorMessage[ERROR_MESSAGE_LENGTH] = _T('\0')
Sets the status in case of no error.
- Parameters:
-
#define OPGP_ERROR_CREATE_NO_ERROR_WITH_CODE |
( |
status, |
|
|
code, |
|
|
message |
|
) |
|
Value:status.errorStatus = OPGP_ERROR_STATUS_SUCCESS; \
status.errorCode = code; \
_tcsncpy(status.errorMessage, message, ERROR_MESSAGE_LENGTH); status.errorMessage[ERROR_MESSAGE_LENGTH] = _T('\0')
Sets the status in case of no error but includes a code e.g. for APDU status word codes.
- Parameters:
-
| status | Must be the OPGP_ERROR_STATUS structure. |
| code | Must be the error code. |
| message | Is the associated error message. |
#define OPGP_ERROR_STATUS_FAILURE 1 |
#define OPGP_ERROR_STATUS_SUCCESS 0 |