oneline-eyre

Crates.iooneline-eyre
lib.rsoneline-eyre
version0.1.0
sourcesrc
created_at2021-11-09 16:36:01.867648
updated_at2021-11-09 16:36:01.867648
descriptionA fork of `simple-eyre` which outputs errors on a single line
homepagehttps://github.com/informalsystems/oneline-eyre
repositoryhttps://github.com/informalsystems/oneline-eyre
max_upload_size
id478956
size10,172
Adi Seredinschi (adizere)

documentation

https://docs.rs/oneline-eyre

README

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.
Commit count: 10

cargo fmt