sausage 0.1.0

Print cause chains of errors
Documentation
  • Coverage
  • 100%
    2 out of 2 items documented1 out of 2 items with examples
  • Size
  • Source code size: 2.91 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 293.7 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 8s Average build duration of successful builds.
  • all releases: 8s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • buffet

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!"))
}