Next: , Previous: Allocation handler, Up: Handler Functions


4.3 Error handler

The following functions may be used to register handler functions that are called by Libgcrypt in case certain error conditions occur.

— Data type: gcry_handler_no_mem_t

This type is defined as: void (*gcry_handler_no_mem_t) (void *, size_t, unsigned int)

— Function: void gcry_set_outofcore_handler (gcry_handler_no_mem_t func_no_mem, void *cb_data)

This function registers func_no_mem as `out-of-core handler', which means that it will be called in the case of not having enough memory available.

— Data type: gcry_handler_error_t

This type is defined as: void (*gcry_handler_error_t) (void *, int, const char *)

— Function: void gcry_set_fatalerror_handler (gcry_handler_error_t func_error, void *cb_data)

This function registers func_error as `error handler', which means that it will be called in error conditions.