You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Errors are forwards compatible, and changes to errors are backwards compatible
Errors are idiomatic and ergonomic. It is easy to match on them and extract additional information for cases where that's useful. The type system prevents errors from being used incorrectly (for example, incorrectly retrieving context for a different error variant)
Error messages are easy to debug
Errors implement best practices with Rust's Error trait (for example, implementing the optional source() function where possible)
An we ended up dividing 99% of our existing errors into two categories:
Actionable: Errors that can/should influence program flow; where it's useful to do different work based on additional error context or error variant information
Informative: Errors that inform that something went wrong, but where it's not useful to match on the error to change program flow
I want to add some case studies to the error design section. Ideas:
The text was updated successfully, but these errors were encountered: