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

allow from variants to skip the error attr's message #15

Closed
onkoe opened this issue Jul 10, 2024 · 1 comment
Closed

allow from variants to skip the error attr's message #15

onkoe opened this issue Jul 10, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@onkoe
Copy link
Owner

onkoe commented Jul 10, 2024

in other words, make this valid:

use pisserror::Error;
use std::error::Error;

#[derive(Debug, Error)]
enum MyError {
    #[error]
    VariantWithFromField(#[from] std::io::Error),
    #[error("message has to be here: {_0}")]
    NormalVariant(i32),
}
@onkoe onkoe added the enhancement New feature or request label Jul 10, 2024
@onkoe
Copy link
Owner Author

onkoe commented Aug 21, 2024

nope. let's do #17

@onkoe onkoe closed this as completed Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant