[][src]Function secp256k1_sys::rustsecp256k1_v0_4_0_default_illegal_callback_fn

#[no_mangle]
pub unsafe extern "C" fn rustsecp256k1_v0_4_0_default_illegal_callback_fn(
    message: *const c_char,
    _data: *mut c_void
)

This function is an override for the C function, this is the an edited version of the original description:

A callback function to be called when an illegal argument is passed to an API call. It will only trigger for violations that are mentioned explicitly in the header. This will cause a panic.

The philosophy is that these shouldn't be dealt with through a specific return value, as calling code should not have branches to deal with the case that this code itself is broken.

On the other hand, during debug stage, one would want to be informed about such mistakes, and the default (crashing) may be inadvisable. When this callback is triggered, the API function called is guaranteed not to cause a crash, though its return value and output arguments are undefined.

See also secp256k1_default_error_callback_fn.