1 unstable release

0.1.0 Nov 9, 2021

#1358 in Rust patterns

Download history 573/week @ 2023-12-17 223/week @ 2023-12-24 630/week @ 2023-12-31 746/week @ 2024-01-07 924/week @ 2024-01-14 895/week @ 2024-01-21 1023/week @ 2024-01-28 528/week @ 2024-02-04 488/week @ 2024-02-11 522/week @ 2024-02-18 566/week @ 2024-02-25 392/week @ 2024-03-03 594/week @ 2024-03-10 706/week @ 2024-03-17 376/week @ 2024-03-24 973/week @ 2024-03-31

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

MIT/Apache

8KB
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

~180KB