Expand description
§GUI panic handler
This crate allows you to handle panics with a GUI dialog made with egui.
The dialog shows panic payload, information about location of the panic and if you want, an option to report the panic to developer and external links.
You will most likely want to use register to register the panic handler.
§A simple example
 
use gui_panic_handler::AppInfo;
use gui_panic_handler::Link;
gui_panic_handler::register(AppInfo {
    name: "Sample app",
    additional_text: "We are sorry, the application has crashed. To help us fix the crash, please report it using the button below.",
    links: vec![
        Link {
            label: "Browse known crash causes",
            url: "https://example.com",
        },
        Link {
            label: "Get help on our forum",
            url: "https://example.com",
        },
        Link {
            label: "Our website",
            url: "https://example.com",
        },
    ],
    report_bug_url: Some(gui_panic_handler::GitHubBugReporter::new(
        String::from("FireFragment"),
        String::from("rust_gui_panic_handler"),
    )),
});
println!("Reading env var...");
let env_var_value = std::env::var("SUPER_IMPORTANT_ENVIRONMENT_VARIABLE").unwrap();
println!("Read: {env_var_value}")Re-exports§
- pub use urlencoding;
Structs§
- AppInfo
- Information about the application used in the error dialog box
If you don’t want to have bug report button, you can use AppInfoNoBugReportinstead
- GitHubBugReporter 
- Link
- A link to be displayed in the error dialog box
Traits§
- ReportBugUrl Maker 
- Generates a URL for bug reports - to be used as AppInfo::report_bug_url.
Functions§
- details
- Puts all details about the crash to a single string.
- register
- Register the panic handler. Run at the beggining of your program.
- show_gui_ egui 
- Displays the panic dialog using egui
Type Aliases§
- AppInfoNoBug Report 
- Type alias for AppInfoto help solve generics inference issue in case of no bug reporting.