[go: up one dir, main page]

eyre 0.4.0

Flexible concrete Error Reporting type built on std::error::Error with customizable Context and Reports
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use eyre::{bail, Result};
use std::io;

pub fn bail_literal() -> Result<()> {
    bail!("oh no!");
}

pub fn bail_fmt() -> Result<()> {
    bail!("{} {}!", "oh", "no");
}

pub fn bail_error() -> Result<()> {
    bail!(io::Error::new(io::ErrorKind::Other, "oh no!"));
}