Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking: error_generic_member_access #34

Open
fia0 opened this issue Jan 17, 2023 · 0 comments
Open

Tracking: error_generic_member_access #34

fia0 opened this issue Jan 17, 2023 · 0 comments

Comments

@fia0
Copy link

fia0 commented Jan 17, 2023

To propagate backtrace properly with thiserror we require two features to land in stable.

rust-lang/rust#99301
rust-lang/rust#96024

We encounter this issue as we start removing old error-chain errors and replacing them with thiserror impls. Once both are available we can write errors as such:

use thiserror::Error;

#[derive(Error, Debug)
pub enum CoolError {
    IoError {
        #[backtrace]
        source: std::io::Error,
    }
}

Which will automatically fetch errors from the provide member.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant