pretty-error-debug

GitHub Workflow Status Crates.io Minimum supported Rust version: 1.31 License: MIT OR Apache-2.0

Display a the chain of an error. Most useful as Result<(), E> for your fn main(), and in conjunction with thiserror.

This crate simply plagiarized extracted all the relevant formatting code from anyhow.

```rust

[derive(prettyerrordebug::Debug, thiserror::Error)]

pub enum MyError { #[error("Error variant 1 happened")] Variant1(#[from] Error1), #[error("Error variant 2 happened")] Variant2(#[from] Error2), }

fn main() -> Result<(), MyError> { … } ```