Crates.io | simple-eyre |
lib.rs | simple-eyre |
version | 0.3.1 |
source | src |
created_at | 2020-02-05 16:04:21.744918 |
updated_at | 2021-06-24 22:49:09.145006 |
description | One of the simplest error reporters one can build ontop of eyre, defining only an error report |
homepage | https://github.com/yaahc/simple-eyre |
repository | https://github.com/yaahc/simple-eyre |
max_upload_size | |
id | 205196 |
size | 11,767 |
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]
simple-eyre = "0.3"
Then install the hook handler before constructing any eyre::Report
types.
use simple_eyre::eyre::{eyre, WrapErr, Report};
fn main() -> Result<(), Report> {
simple_eyre::install()?;
let e: Report = eyre!("oh no this program is just bad!");
Err(e).wrap_err("usage example successfully experienced a failure")
}