1 unstable release

0.1.0 Nov 9, 2021

#844 in Rust patterns

Download history 473/week @ 2024-07-21 314/week @ 2024-07-28 406/week @ 2024-08-04 318/week @ 2024-08-11 472/week @ 2024-08-18 339/week @ 2024-08-25 1137/week @ 2024-09-01 1657/week @ 2024-09-08 1803/week @ 2024-09-15 1910/week @ 2024-09-22 1619/week @ 2024-09-29 2450/week @ 2024-10-06 1093/week @ 2024-10-13 387/week @ 2024-10-20 545/week @ 2024-10-27 575/week @ 2024-11-03

2,713 downloads per month
Used in 4 crates (3 directly)

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