DCHK Client Version 0.5.7 - Documentation DomainCheck

C-API Error-Functions
[C-API Functions]

Functions used for setting and reading of errors. More...


Detailed Description

Most DCHK-API-functions will return a value on which you can see if the call was successful or not. A value of 0 or NULL will indicate an error, all other values will indicate a success.

In case of an error you can use the following functions to get further information about the error:

Functions

const char * irislwz_GetAdditionalErrorText (IRISLWZ_HANDLE *dchk)
 Return additional information about last error.
const char * irislwz_GetError (int code)
 Return text of a specific error code.
int irislwz_GetErrorCode (IRISLWZ_HANDLE *dchk)
 Return last error code.
const char * irislwz_GetErrorText (IRISLWZ_HANDLE *dchk)
 Return text of last error code.
const char * irislwz_GetSocketError (int code)
 Return text of a specific socket error code.
void irislwz_PrintError (IRISLWZ_HANDLE *dchk)
 Print last error to STDOUT.
void irislwz_SetError (IRISLWZ_HANDLE *dchk, int code, const char *fmt,...)
 Set an error on an DCHK object.

Function Documentation

const char* irislwz_GetAdditionalErrorText ( IRISLWZ_HANDLE dchk  ) 

Return additional information about last error.

Parameters:
[in] dchk Pointer to an DCHK object
Returns:
Pointer to the additional error text, or NULL if there is no text.
const char* irislwz_GetError ( int  code  ) 
Parameters:
[in] code Error code
Returns:
pointer to the corresponding text of the error code or NULL, if the error code is unknown.
int irislwz_GetErrorCode ( IRISLWZ_HANDLE dchk  ) 

Return last error code

Parameters:
[in] dchk Pointer to an DCHK object
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. You should always check the return value of a dchk_*-Function to check if an error occurred. Only when the return value indicates an error, the error code of this function is valid.
const char* irislwz_GetErrorText ( IRISLWZ_HANDLE dchk  ) 

Return text of last error code

Parameters:
[in] dchk Pointer to an DCHK object
Returns:
Pointer to the error text.
const char* irislwz_GetSocketError ( int  code  ) 

this is an internal function, which returns the text of a specific socket error code. It is automatically called by irislwz_GetError, if an error code between 1000 and 1999 occurs.

Parameters:
[in] code Socket error code
Returns:
pointer to the corresponding text of the error code or NULL, if the error code is unknown.
void irislwz_PrintError ( IRISLWZ_HANDLE dchk  ) 

This function prints the last error on the DCHK object to STDOUT (Screen).

Parameters:
[in] dchk Pointer to the DCHK-Object
void irislwz_SetError ( IRISLWZ_HANDLE dchk,
int  code,
const char *  fmt,
  ... 
)

This function is used internally to set an error on an DCHK object.

Parameters:
[in] dchk Pointer to the DCHK-Object
[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
Generated on Wed Aug 4 21:23:46 2010 for DCHK Client Documentation by  doxygen 1.6.3