Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 1 day 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 (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-11-09T04:35:32.000Z (almost 6 years ago)
- Last Synced: 2024-10-11T14:17:33.059Z (26 days ago)
- Language: Rust
- Homepage: https://crates.io/crates/lazy-panic
- Size: 554 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
lazy-panic.rs
====================[![Build Status](https://travis-ci.org/DoumanAsh/lazy-panic.rs.svg?branch=master)](https://travis-ci.org/DoumanAsh/lazy-panic.rs)
[![Crates.io](https://img.shields.io/crates/v/lazy-panic.svg)](https://crates.io/crates/lazy-panic)
[![Documentation](https://docs.rs/lazy-panic/badge.svg)](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");
}