DCHK Client Version 0.5.7 - Documentation DomainCheck

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

dchk::CError::CError (  ) 

Initializes error code and text

dchk::CError::~CError (  ) 

Frees all memory used by this class


Member Function Documentation

void dchk::CError::CopyError ( IRISLWZ_HANDLE handle  ) 

This function is used internally to copy an error from an IRISLWZ_HANDLE object into this class.

Parameters:
[in] handle Pointer to a IRISLWZ_HANDLE object
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
Remarks:
Please keep in mind that a non zero value does not necessarily mean that the previous function was not successful. If a function returns a value, you should always check if it is valid or indicates an error. Most functions return 0 or NULL when an error occurred, and only if this is the case, you will get the correct error.
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

dchk::CError::code [private]

Holds the last error code

Holds the last additional error text if any


The documentation for this class was generated from the following files:
Generated on Wed Aug 4 21:23:46 2010 for DCHK Client Documentation by  doxygen 1.6.3