visualpanic-rs

Crates.iovisualpanic-rs
lib.rsvisualpanic-rs
version0.1.2
sourcesrc
created_at2023-11-21 13:33:58.697991
updated_at2023-11-21 14:04:21.235554
descriptionA library providing a panic hook for Rust applications that visualizes the panic with a native error dialog on supported systems
homepage
repositoryhttps://github.com/philippremy/visualpanic-rs
max_upload_size
id1044166
size10,329
Philipp Remy (philippremy)

documentation

README

VisualPanic (visualpanic-rs)

Crates.io License

A library providing a panic hook for Rust applications that visualizes the panic with a native error dialog on supported systems (see listed OSes at native-dialog).

Installation

cargo add visualpanic_rs

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

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

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

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

cargo fmt