Crate visualpanic_rs

source ·
Expand description

VisualPanic

Visualize panics with native GUI dialogs on supported systems (see list at https://crates.io/crates/native-dialog).

Provides a solution to panic visually, useful for GUI applications where a console view might not be available at all times. Customizable in some ways, e.g., which icon, title and dialog level should be used.

Example 1: Use the default settings and register for the whole application

fn main() {
    VisualPanic::default().register_global();
}

Example 2: Use custom settings and register for the whole application

fn main() {
    VisualPanic::new(
        Some("path/to/custom_icon.png"),
        Some("Custom Title"),
        Some(VisualPanicLevel::Info))
    .register_global();
}

Structs

  • The struct containing information on the current VisualPanic settings.

Enums