globalplatform/error.h File Reference

#include "unicode.h"

Go to the source code of this file.

Classes

struct  OPGP_ERROR_STATUS

Defines

#define OPGP_ERROR_STATUS_SUCCESS   0
 No error occured.
#define OPGP_ERROR_STATUS_FAILURE   1
 An error occurred.
#define ERROR_MESSAGE_LENGTH   256
#define OPGP_ERROR_CHECK(status)   status.errorStatus
#define OPGP_ERROR_CREATE_ERROR(status, code, message)
#define OPGP_ERROR_CREATE_NO_ERROR(status)
#define OPGP_ERROR_CREATE_NO_ERROR_WITH_CODE(status, code, message)

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:
status Must be the OPGP_ERROR_STATUS structure.
#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:
status Must be the OPGP_ERROR_STATUS structure.
#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

An error occurred.

#define OPGP_ERROR_STATUS_SUCCESS   0

No error occured.

Generated on Wed Aug 11 00:24:28 2010 for GlobalPlatformLibrary by  doxygen 1.6.3