Skip to main content

install_panic_hook

Function install_panic_hook 

Source
pub fn install_panic_hook(raw: &[OsString])
Expand description

Makes a panic in skif exit 2 (could not run) in every format, after the default hook has printed its message and location to stderr; in --format json mode stdout also receives exactly one error document (kind internal). The release binary is built with panic = "abort", and the hook runs before the abort, so the process exits 2 instead of being killed by SIGABRT.

For the skif binary only; an embedding host owns its own panic handling.