Defines | |
#define | HAM_DEBUG_LEVEL_DEBUG 0 |
#define | HAM_DEBUG_LEVEL_NORMAL 1 |
#define | HAM_DEBUG_LEVEL_FATAL 3 |
Typedefs | |
typedef void HAM_CALLCONV(* | ham_errhandler_fun )(int level, const char *message) |
Functions | |
HAM_EXPORT void HAM_CALLCONV | ham_set_errhandler (ham_errhandler_fun f) |
HAM_EXPORT const char *HAM_CALLCONV | ham_strerror (ham_status_t status) |
HAM_EXPORT void HAM_CALLCONV | ham_get_version (ham_u32_t *major, ham_u32_t *minor, ham_u32_t *revision) |
HAM_EXPORT void HAM_CALLCONV | ham_get_license (const char **licensee, const char **product) |
#define HAM_DEBUG_LEVEL_DEBUG 0 |
A debug message
Internally, these messages are generated by ham_trace() calls.
Definition at line 332 of file hamsterdb.h.
#define HAM_DEBUG_LEVEL_FATAL 3 |
A fatal error message
Internally, these messages are generated by ham_assert() assertion checks which are compiled in DEBUG mode or by ham_verify() assertion macros, which are always active in any build.
Definition at line 348 of file hamsterdb.h.
#define HAM_DEBUG_LEVEL_NORMAL 1 |
A normal error message
Internally, these messages are generated by ham_log() calls.
Definition at line 339 of file hamsterdb.h.
typedef void HAM_CALLCONV(* ham_errhandler_fun)(int level, const char *message) |
A typedef for a custom error handler function
This error handler can be used in combination with ham_set_error_handler().
message | The error message | |
level | The error level:
|
Definition at line 325 of file hamsterdb.h.
HAM_EXPORT void HAM_CALLCONV ham_get_license | ( | const char ** | licensee, | |
const char ** | product | |||
) |
Returns the name of the licensee and the name of the licensed product
licensee | If not NULL, will point to the licensee name, or to an empty string "" for non-commercial versions | |
product | If not NULL, will point to the product name |
Referenced by ham::db::get_license().
HAM_EXPORT void HAM_CALLCONV ham_get_version | ( | ham_u32_t * | major, | |
ham_u32_t * | minor, | |||
ham_u32_t * | revision | |||
) |
Returns the version of the hamsterdb library
major | If not NULL, will return the major version number | |
minor | If not NULL, will return the minor version number | |
revision | If not NULL, will return the revision version number |
Referenced by ham::db::get_version().
HAM_EXPORT void HAM_CALLCONV ham_set_errhandler | ( | ham_errhandler_fun | f | ) |
Sets the global error handler
This handler will receive all debug messages that are emitted by hamsterdb. You can install the default handler by setting f to 0.
The default error handler prints all messages to stderr. To install a different logging facility, you can provide your own error handler.
Note that the callback function must have the same calling convention as the hamsterdb library.
f | A pointer to the error handler function, or NULL to restore the default handler |
Referenced by ham::db::set_errhandler().
HAM_EXPORT const char* HAM_CALLCONV ham_strerror | ( | ham_status_t | status | ) |
Translates a hamsterdb status code to a descriptive error string
status | The hamsterdb status code |
Referenced by ham::error::get_string().