Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

error.h File Reference

This file contains the module for error handling. More...

Go to the source code of this file.

Classes

struct  ERRORTYPEREGISTRATIONFORM

Initialization

CHIPCARD_API void Error_ModuleInit ()
CHIPCARD_API void Error_ModuleFini ()

Error Type Registration

These functions are used to allocate error types. Each module should allocate a type to allow descriptive error messages. Since function pointers are involved you should carefully register and unregister the error types.

CHIPCARD_API int Error_RegisterType (ERRORTYPEREGISTRATIONFORM *tptr)
CHIPCARD_API int Error_UnregisterType (ERRORTYPEREGISTRATIONFORM *tptr)

Error Type Lookup

These functions lookup error types by name or by number.

CHIPCARD_API int Error_FindType (const char *name)
CHIPCARD_API const char * Error_GetTypename (int t)

Getters And Setters

These functions get and set parts of an ERRORCODE.

CHIPCARD_API ERRORCODE Error_New (int iscustom, int severity, int typ, int code)
CHIPCARD_API int Error_IsOk (ERRORCODE c)
CHIPCARD_API int Error_GetSeverity (ERRORCODE c)
CHIPCARD_API void Error_SetSeverity (ERRORCODE *c, int v)
CHIPCARD_API int Error_IsCustom (ERRORCODE c)
CHIPCARD_API void Error_SetIsCustom (ERRORCODE *c, int iscustom)
CHIPCARD_API int Error_GetType (ERRORCODE c)
CHIPCARD_API void Error_SetType (ERRORCODE *c, int v)
CHIPCARD_API int Error_GetCode (ERRORCODE c)
CHIPCARD_API void Error_SetCode (ERRORCODE *c, int v)

Verbosity

Composing error messages.

CHIPCARD_API int Error_ToString (ERRORCODE c, char *buffer, int bsize)

Defines

#define ERROR_SEVERITY_DEBUG   0
#define ERROR_SEVERITY_INFO   1
#define ERROR_SEVERITY_WARN   2
#define ERROR_SEVERITY_ERR   3
#define ERROR_TYPE_ERROR   0
#define ERROR_UNSPECIFIED   1
#define ERROR_COULD_NOT_REGISTER   2
#define ERROR_COULD_NOT_UNREGISTER   3
#define ERROR_INVALID_BUFFERSIZE   4

Variables

CHIPCARD_API typedef const
char *(* 
ERRORMESSAGEPTR )(int c)
CHIPCARD_API typedef unsigned
long 
ERRORCODE


Detailed Description

This file contains the module for error handling.


Generated on Fri Dec 3 23:10:24 2004 for libchipcard by  doxygen 1.3.9.1