Crate pretty_panic
source ·Expand description
pretty-panic
Provides a simple way to deliver prettier panic messages to the user.
Wraps around std::panic::set_hook()
, allowing you to easily change
the panic message for your release builds.
Example
use pretty_panic::pretty_panic;
fn main() {
pretty_panic!();
panic!("A panic message.");
}
It’s that simple! The pretty_panic!()
macro can take a custom panic handler function as an argument.
If one isn’t passed, it simply uses the default.
Macros
Sets the panic handler function to a function of your choosing.