1 unstable release

0.1.0 Jan 5, 2023

#13 in #error-chain

Apache-2.0 OR MIT

3KB

An easy way to print cause chains in errors. Simply wrap your error type in ErrorChain and debug format it.

Works great with thiserror's #[from]!

use sausage::ErrorChain;
use std::io;

fn main_() -> Result<(), ErrorChain> {
    might_fail()?;

    Ok(())
}

fn might_fail() -> Result<(), io::Error> {
    Err(io::Error::new(io::ErrorKind::Other, "oh noes!"))
}

Dependencies

~21KB