oopsie 0.1.0-rc.20

Ergonomic, structured error handling: context selectors, traced errors, and rich colorized reports
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#![cfg_attr(
    feature = "unstable-error-generic-member-access",
    feature(error_generic_member_access)
)]

use oopsie::Oopsie;

// oopsie adds no implicit `Display` bound (thiserror-style inference is out of
// scope): interpolating a generic field whose parameter is not `Display` is a
// normal rustc bound error pointing at the format string's use of the value.
#[derive(Debug, Oopsie)]
#[oopsie(module(false))]
enum E<T: std::fmt::Debug> {
    #[oopsie("value is {value}")]
    Show { value: T },
}

fn main() {}