secp256k1_context_set_error_callback

Set a callback function to be called when an internal consistency check fails. The default is crashing.

This can only trigger in case of a hardware failure, miscompilation, memory corruption, serious bug in the library, or other error would can otherwise result in undefined behaviour. It will not trigger due to mere incorrect usage of the API (see secp256k1_context_set_illegal_callback for that). After this callback returns, anything may happen, including crashing.

Args: ctx: an existing context object. In: fun: a pointer to a function to call when an internal error occurs, taking a message and an opaque pointer (NULL restores the default handler, see secp256k1_context_set_illegal_callback for details). data: the opaque pointer to pass to fun above, must be NULL for the default handler.

See also secp256k1_context_set_illegal_callback.

extern (C)
void
secp256k1_context_set_error_callback
(,
void function
(
const(char)* message
,
void* data
)
fun
,
const(void)* data
)

Meta