| Crates.io | oneline-eyre |
| lib.rs | oneline-eyre |
| version | 0.1.0 |
| created_at | 2021-11-09 16:36:01.867648+00 |
| updated_at | 2021-11-09 16:36:01.867648+00 |
| description | A fork of `simple-eyre` which outputs errors on a single line |
| homepage | https://github.com/informalsystems/oneline-eyre |
| repository | https://github.com/informalsystems/oneline-eyre |
| max_upload_size | |
| id | 478956 |
| size | 10,172 |
This is a fork of
simple-eyrewhich outputs errors traces on a single line.
This library provides a custom eyre::EyreHandler type for usage with eyre that provides
a minimal error report with no additional context. Essentially the minimal implementation of an
error reporter.
Add the following to your toml file:
[dependencies]
oneline-eyre = "0.3"
Then install the hook handler before constructing any eyre::Report types.
use oneline_eyre::eyre::{eyre, WrapErr, Report};
fn main() -> Result<(), Report> {
oneline_eyre::install()?;
let e: Report = eyre!("oh no this program is just bad!");
Err(e).wrap_err("usage example successfully experienced a failure")
}