Skip to main content

Module errors

Module errors 

Source
Expand description

Custom error types and panic hook.

Provides a panic hook that restores the terminal to a clean state before printing a friendly error message, and a helper to restore terminal state that can be called from other recovery paths.

Functionsยง

install_panic_hook
Installs a custom panic hook that restores the terminal before printing a friendly error message.
restore_terminal
Best-effort terminal state restoration.