Oopsie woopsie!

A crate to make debugging unexpected panics easier both on developer and consumer machines. Provides a panic handler which generates a helpful panic message and saves a backtrace, system information and minidump to a file.

Features

Usage example

``` use std::panic;

fn main() { panic::sethook(Box::new(|panicinfo: &panic::PanicInfo| { let panichandlingconfig = oopsie-woopsie::PanicHandlingConfig { terminationmethod: "exit".tostring(), // The method used to terminate the program. Possible values: "Exit", "Abort", "Loop" terminationexitcode: Some(101), // The returned error code when termination method "Exit" is used. Defaults to exit code 101. panicinfologfiledestination: "C:/some/path/panic.txt".tostring(), // The path where to place the panic info log file. minidumpfiledestination: "C:/some/path/panic.mdmp".to_string(), // The path where to place the minidump file. };

    // Replaces the default panic handler with the custom made one.
    oopsie-woopsie::handle_error(
        panicinfo,
        panic_handling_config,
        Some(std::backtrace::Backtrace::force_capture()),
    );
}));

} ```

Reminder: This crate only works for panics. It cannot debug crashes. If you need crash debugging, you need to use an out-of-process crash handler such as Breakpad, Crashpad. There is also EmbarkStudio's Crash handling utility crates.