errorstack 0.1.1

A derive-based typed error system with first-class error stack building.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Checks that combining thiserror's `#[from]` with `#[location]` produces a
// compile error, since `#[from]` generates a `From` impl that cannot capture
// the caller location.
use errorstack::ErrorStack;

#[derive(thiserror::Error, ErrorStack, Debug)]
enum AppError {
    #[error("conversion failed")]
    Conversion {
        #[from]
        source: std::io::Error,
        #[location]
        location: &'static std::panic::Location<'static>,
    },
}

fn main() {}