-
Notifications
You must be signed in to change notification settings - Fork 71
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
add more detail to errors #113
Conversation
2ff16af
to
d7ff47b
Compare
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.
RTBM - 0.9.0 is ready now
impl fmt::Display for GooseTaskError { | ||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { | ||
fmt::Display::fmt(&self, f) |
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.
@jeremyandrews This will create an infinite loop as per rust-lang/rust#74892.
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.
It only works right now as we use the Debug and not the Display output for errors when returning from main.
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.
see #128
The goal of this PR is to make errors more rich, allowing application developers the option of what they want to display. In our examples,
main()
returns the errors so they are simply displayed.enriched
GooseError::InvalidHost
, for example:enriched
GooseError::FeatureNotEnabled
, for example:enriched
GooseError::InvalidWaitTime
, for example:enriched
GooseError::InvalidWeight
, for example:enriched
GooseError::NoTaskSets
enriched
GooseError::InvalidOption