Oopsie woopsie!

A crate to make debugging unexpected panics easier both on developer and consumer machines. Gives you a panic handler which generates a backtrace, backtrace frames (with symbols) and a minidump.

Reminder: You should always have an out-of-process crash handler incase of a crash. This crate only handles panics. It is recommended to use Breakpad or Crashpad. There is also EmbarkStudio's Crash handling utility crates (Which i cannot quite figure out).

Features

A little warning:

As i am still quite new to Rust and not very experianced, this crate may panic itself, creating another panic report. After a third panic Rust forcefully exits the program.

Usage example

``` panic::sethook(Box::new(|panicinfo: &panic::PanicInfo| { let panichandlingconfig = oopsiewoopsie::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:/Users/norma/Downloads/panic.txt".tostring(), // The path where to place the panic info log file. minidumpfiledestination: "C:/Users/norma/Downloads/panic.mdmp".tostring(), // 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()), // A captured backtrace. Quite resource intensive, pass 'None' to disable.
);

})); ```

Contributions very much welcome!

This is my first time making a crate, and i am still learning Rust. Any help is really appreciated!