future
future copied to clipboard
Fix recover/recoverWith MatchError if partial function is not satisfied and handle exception within it
Problem
Recover functions in scala futures does not handle partial functions well
Solution
- use convenient transform in recover
- modify onException block with isDefinedAt & exp handler in recoverWith
Checklist
- [x] Read CONTRIBUTING.md
- [x] Unit test all changes
- [x] Update
README.mdif applicable - [x] Add
[WIP]to the pull request title if it's work in progress - [x] Squash commits that aren't meaningful changes