Determine Proper Error Handling for Thrown Exception in 2.x
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 2.5k
- Forks
- 636
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 7
Description
The guide's section on error handling provides the following example:
val err2 = Stream(1,2,3) ++ (throw new Exception("!@#$"))
The guide states that:
The handleErrorWith method lets us catch any of these errors...
However, this is not true for err2, which throws the exception even when .handleErrorWith is used.
For example, the expression below throws rather than yielding List("abc"):
err2.handleErrorWith(_ => Stream.emit("abc")).toList
M Pilquist stated the following in Gitter:
Hm, though fs2 3.x does in fact do that
ok yeah, it fails on fs2 2.x but passes on 3.x
Could you open an issue? Not sure what it should do but we can figure that out in the issue
Contributor guide
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 with the guide's error-handling section and reproduce the err2 and handleErrorWith examples against fs2 2.x, then compare the stated behavior with fs2 3.x. Determine whether the intended resolution is a guide correction or a behavior change, and consider the issue done when the chosen behavior is implemented or documented consistently with a verified example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- stream-processing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100