DCHK Client Version 0.5.7 - Documentation
|
|
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:
Function Documentation
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:
-
- Returns:
- pointer to the corresponding text of the error code or NULL, if the error code is unknown.
Return last error code
- Parameters:
-
[in] | dchk | Pointer to an DCHK object |
- Returns:
- last error code
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.
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 |