DCHK Client Version 0.5.7 - Documentation
|
|
dchk::CError Class Reference
[C++-API]
Base class for storing errors.
More...
#include <dchk.h>
Detailed Description
This is a base class used by all other classes in this library for storing errors
Error functions |
|
void | CopyError (IRISLWZ_HANDLE *handle) |
| Copies an error from an IRISLWZ_HANDLE into this class.
|
const char * | GetAdditionalErrorText () const |
| Return additional information about last error.
|
int | GetErrorCode () const |
| Return last error code.
|
const char * | GetErrorText () const |
| Return text of last error code.
|
void | PrintError () const |
| Print last error to STDOUT.
|
void | SetError (int code, const char *fmt=NULL,...) |
| Set an error on this class.
|
Public Member Functions |
| CError () |
| constructor of the class
|
| ~CError () |
| destructor of the class
|
Private Attributes |
int | code |
| Holds the last error code.
|
char * | errortext |
| Holds the last additional error text if any.
|
Constructor & Destructor Documentation
Initializes error code and text
dchk::CError::~CError |
( |
|
) |
|
Frees all memory used by this class
Member Function Documentation
This function is used internally to copy an error from an IRISLWZ_HANDLE object into this class.
- Parameters:
-
const char * dchk::CError::GetAdditionalErrorText |
( |
|
) |
const |
Return additional information about last error.
- Returns:
- Pointer to the additional error text, or NULL if there is no text.
int dchk::CError::GetErrorCode |
( |
|
) |
const |
Return last error code
- Returns:
- last error code
const char * dchk::CError::GetErrorText |
( |
|
) |
const |
Return text of last error code
- Returns:
- Pointer to the error text.
void dchk::CError::PrintError |
( |
|
) |
const |
This function prints the last error occurred in this class to STDOUT (Screen).
void dchk::CError::SetError |
( |
int |
code, |
|
|
const char * |
fmt = NULL , |
|
|
|
... | |
|
) |
| | |
This function is used internally to store an error in this class
- Parameters:
-
[in] | code | Error code |
[in] | fmt | Format string for an additional error text. The syntax of this string is identical to sprintf/printf. |
[in] | ... | Optional additional parameters for the format string |
Field Documentation
Holds the last error code
Holds the last additional error text if any
The documentation for this class was generated from the following files:
- include/dchk.h
- src/lib/CDchk.cpp