https://github.com/doumanash/lazy-panic.rs
Provides lazy utilities to lazily set custom panic hook
https://github.com/doumanash/lazy-panic.rs
Last synced: 3 months ago
JSON representation
Provides lazy utilities to lazily set custom panic hook
- Host: GitHub
- URL: https://github.com/doumanash/lazy-panic.rs
- Owner: DoumanAsh
- License: mit
- Created: 2016-09-30T04:46:54.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-11-09T04:35:32.000Z (over 6 years ago)
- Last Synced: 2025-03-19T09:44:14.263Z (4 months ago)
- Language: Rust
- Homepage: https://crates.io/crates/lazy-panic
- Size: 554 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
lazy-panic.rs
====================[](https://travis-ci.org/DoumanAsh/lazy-panic.rs)
[](https://crates.io/crates/lazy-panic)
[](https://docs.rs/crate/lazy-panic)Provides lazy utilities to lazily set custom panic hook
## Available features
- `backtrace-on` - Enables `Debug` formatter to print backtrace
## Example
Setup simple panic message
```rust
#[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");
}