simple-eyre

Crates.iosimple-eyre
lib.rssimple-eyre
version0.3.1
sourcesrc
created_at2020-02-05 16:04:21.744918
updated_at2021-06-24 22:49:09.145006
descriptionOne of the simplest error reporters one can build ontop of eyre, defining only an error report
homepagehttps://github.com/yaahc/simple-eyre
repositoryhttps://github.com/yaahc/simple-eyre
max_upload_size
id205196
size11,767
eyre (github:eyre-rs:eyre)

documentation

https://docs.rs/simple-eyre

README

simple-eyre

Latest Version Rust Documentation

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.

Setup

Add the following to your toml file:

[dependencies]
simple-eyre = "0.3"

Then install the hook handler before constructing any eyre::Report types.

Example

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")
}

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Commit count: 6

cargo fmt