#error

oneline-eyre

A fork of simple-eyre which outputs errors on a single line

1 unstable release

0.1.0 Nov 9, 2021

#999 in Rust patterns

Download history 642/week @ 2022-08-12 350/week @ 2022-08-19 292/week @ 2022-08-26 386/week @ 2022-09-02 347/week @ 2022-09-09 456/week @ 2022-09-16 575/week @ 2022-09-23 1004/week @ 2022-09-30 395/week @ 2022-10-07 268/week @ 2022-10-14 646/week @ 2022-10-21 1141/week @ 2022-10-28 869/week @ 2022-11-04 679/week @ 2022-11-11 661/week @ 2022-11-18 892/week @ 2022-11-25

3,270 downloads per month
Used in 2 crates (via ibc-relayer-cli)

MIT/Apache

7KB
64 lines

oneline-eyre

Latest Version Rust Documentation

This is a fork of simple-eyre which 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.

Setup

Add the following to your toml file:

[dependencies]
oneline-eyre = "0.3"

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

Example

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

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.

Dependencies

~170KB