Skip to main content

miniextendr_panic_hook

Function miniextendr_panic_hook 

Source
#[unsafe(no_mangle)]
pub extern "C-unwind" fn miniextendr_panic_hook()
Expand description

Register the miniextendr panic hook.

If MINIEXTENDR_BACKTRACE is set to true or 1, the default Rust panic hook runs (full traceback printed to stderr); otherwise the hook swallows the panic output silently so the R error (emitted by panic_message_to_r_error) is what users see.

Idempotent within a DLL instance: the first call installs, subsequent calls are no-ops. If the DLL is unloaded and loaded again, the new instance has its own INSTALLED flag and installs afresh.