Haka
|
Go to the source code of this file.
Functions | |
void | error (const char *error,...) FORMAT_PRINTF(1 |
void const char * | errno_error (int err) |
bool | check_error (void) |
const char * | clear_error (void) |
Error handling functions.
bool check_error | ( | void | ) |
Check if an error has occurred. This function does not clear error flag.
const char* clear_error | ( | void | ) |
Get the error message and clear the error state.
void const char* errno_error | ( | int | err | ) |
Convert the err
value to a human readable error message.
The returned string will be erased by the next call to this function. This function is thread-safe.
void error | ( | const char * | error, |
... | |||
) |
Set error
to be reported to the callers. The function follows the printf API and can be used in multi-threaded application. The error can then be retrieved using clear_error() and check_error().
If lua is at the origin of this call, the error will be converted to a lua error.