-
-
Notifications
You must be signed in to change notification settings - Fork 163
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
Warn about double-inclusion of error message #38
Comments
I was talking about this in Cranelift - thiserror includes the inner error for Debug output but not for Display. From my perspective this is a bug because I have no idea what actually went wrong in Display mode. Would it be possible to make the two implementions consistent? Either include the inner error in Display or do not include it in Debug |
I’m interested in trying to implement this. Looks like it would make the most sense to check after expanding display shorthand in |
+ remove double error message from them. With the source attribute the inner error is print without the need to ( see: dtolnay/thiserror#38).
I recently cooked up bytecodealliance/wasmtime#532 which fixed a "double error message" getting printed for errors such as:
It'd be great if this crate could somehow issue a diagnostic indicating that there's no need to include the
{0}
in the#[error]
because it's already rendered in the final error via#[from]
The text was updated successfully, but these errors were encountered: