-
Notifications
You must be signed in to change notification settings - Fork 48
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
fix: improve err message #236
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL about the source attribute
#[error("{kind}")] | ||
Custom { | ||
kind: ErrorKind, | ||
#[source] | ||
error: Box<dyn std::error::Error + Send + Sync>, | ||
}, | ||
#[error("{message}: {error}")] | ||
#[error("{message}")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious in these why for Custom
the error is not included in this message (does source automatically include it?), and for Full
, why the error kind is ignored
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup, #[source]
creates a chain of error message when you go to display it. For full
, didn't see a need to include it since the error message should for the most part tell you what kind of class of errors it it. Normally I don't think kind
is that useful in error messages unless there's no other context to the error
hmm, looks like 4.1.1 breaks |
Prob worth opening an issue for that. The error message was in the output, but that was very cryptic to read |
based on #232
Adds in the sandbox error improvement