upscaledb  2.2.1
Macros | Typedefs | Functions
upscaledb Static Functions

Macros

#define UPS_DEBUG_LEVEL_DEBUG   0
 
#define UPS_DEBUG_LEVEL_NORMAL   1
 
#define UPS_DEBUG_LEVEL_FATAL   3
 

Typedefs

typedef void UPS_CALLCONV(* ups_error_handler_fun) (int level, const char *message)
 

Functions

UPS_EXPORT void UPS_CALLCONV ups_set_error_handler (ups_error_handler_fun f)
 
UPS_EXPORT const char *UPS_CALLCONV ups_strerror (ups_status_t status)
 
UPS_EXPORT void UPS_CALLCONV ups_get_version (uint32_t *major, uint32_t *minor, uint32_t *revision)
 

Detailed Description

Macro Definition Documentation

#define UPS_DEBUG_LEVEL_DEBUG   0

A debug message

Definition at line 449 of file upscaledb.h.

#define UPS_DEBUG_LEVEL_FATAL   3

A fatal error message

Definition at line 455 of file upscaledb.h.

#define UPS_DEBUG_LEVEL_NORMAL   1

A normal error message

Definition at line 452 of file upscaledb.h.

Typedef Documentation

typedef void UPS_CALLCONV(* ups_error_handler_fun) (int level, const char *message)

A typedef for a custom error handler function

This error handler can be used in combination with ups_set_error_handler().

Parameters
messageThe error message
levelThe error level:
See also
error_levels

Definition at line 446 of file upscaledb.h.

Function Documentation

UPS_EXPORT void UPS_CALLCONV ups_get_version ( uint32_t major,
uint32_t minor,
uint32_t revision 
)

Returns the version of the upscaledb library

Parameters
majorIf not NULL, will return the major version number
minorIf not NULL, will return the minor version number
revisionIf not NULL, will return the revision version number

Referenced by upscaledb::db::get_version().

UPS_EXPORT void UPS_CALLCONV ups_set_error_handler ( ups_error_handler_fun  f)

Sets the global error handler

This handler will receive all debug messages that are emitted by upscaledb. 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 upscaledb library.

Parameters
fA pointer to the error handler function, or NULL to restore the default handler

Referenced by upscaledb::db::set_errhandler().

UPS_EXPORT const char* UPS_CALLCONV ups_strerror ( ups_status_t  status)

Translates a upscaledb status code to a descriptive error string

Parameters
statusThe upscaledb status code
Returns
A pointer to a descriptive error string

Referenced by error(), and upscaledb::error::get_string().