pub fn install_panic_handler()Expand description
Install the custom panic handler.
Linux equivalent: panic_notifier_list
This wraps the default panic handler to:
- Generate a crash report
- Call the recovery callback (if set) to save state
- Log the crash report
- Write crash report to file
- Call the original panic handler
§Example
ⓘ
use reovim_kernel::panic::{install_panic_handler, set_recovery_callback};
// Set up recovery to save unsaved buffers
set_recovery_callback(Box::new(|info| {
// Save unsaved buffers...
}));
// Install the handler
install_panic_handler();§Notes
- Can only be called once; subsequent calls are no-ops
- Must be called early in application startup