| Crates.io | lazy-panic |
| lib.rs | lazy-panic |
| version | 1.0.0 |
| created_at | 2016-09-30 16:46:34.252865+00 |
| updated_at | 2018-11-09 04:35:48.12146+00 |
| description | Lazy utils to customize panic messages |
| homepage | |
| repository | https://github.com/DoumanAsh/lazy-panic.rs |
| max_upload_size | |
| id | 6665 |
| size | 13,028 |
Provides lazy utilities to lazily set custom panic hook
backtrace-on - Enables Debug formatter to print backtraceSetup simple panic message
#[macro_import]
extern crate lazy_panic;
fn main() {
set_panic_message!(lazy_panic::formatter::Simple);
//prints `Panic: main.rs:8 - LOLKA\n`
panic!("LOLKA");
set_panic_message!(lazy_panic::formatter::Debug);
//prints `{Backtrace}\nPanic: main.rs:12 - LOLKA\n`
panic!("LOLKA");
}