[tracking] Better error handling
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 323
- Forks
- 171
- PR merge metrics
- No merged PRs in 30d
Description
This is a general tracking issue for the removal of (or to at least greatly
diminish the presence of) unwraps and expects, to guard against runtime
panics.
Some tasks that come to mind:
- Convert all
Result<..., String>types to beResult<..., Error>and roll an
Errorenum for each place with a non-trivial amount of errors to handle- As a result (no pun intended), convert instances of
unwrap/expect,
wherever possible, to use the?operator to propagate errors up Maybe useanyhowto reduce boilerplate?
- As a result (no pun intended), convert instances of
- Remove as many instances of
unwrapandexpectas possible in order to
decrease the occurrence of panics- At the very least, convert
unwraps toexpects, to indicate what the problem was and where it occurred
- At the very least, convert
cc @grahamc
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inventorying the project's unwrap, expect, and Result<..., String> uses to identify a focused area with non-trivial error handling. Check whether existing error enums or propagation patterns provide a suitable scope. Done means reducing panics in the selected area and using informative, typed error handling where appropriate.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100