Skip to content
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

Handle rethrows in `recover` more gracefully #27506

Merged

Conversation

@jrudolph
Copy link
Member

jrudolph commented Aug 15, 2019

The idea is that .recover { xyz => throw newException } is common enough
not to log an ERROR message just because we didn't catch it in the Recover stage.

On the other hand, using mapError can be a better choice if you just want to
map the error (but there might be other occurrences where a partial function is not
enough to avoid throwing an error from recover).

The idea is that `.recover { xyz => throw newException }` is common enough
not to log an ERROR message just because we didn't catch it in the Recover stage.

On the other hand, using `mapError` can be a better choice if you just want to
map the error (but there might be other occurrences where a partial function is not
enough to avoid throwing an error from recover).
@akka-ci
Copy link

akka-ci commented Aug 15, 2019

Test PASSed.

@raboof
raboof approved these changes Aug 16, 2019
@johanandren johanandren merged commit f51dc37 into akka:master Aug 28, 2019
3 checks passed
3 checks passed
Jenkins PR Validation Test PASSed. 4710 tests run, 461 skipped, 0 failed.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
typesafe-cla-validator All users have signed the CLA
Details
@johanandren johanandren added this to the 2.6.0-M7 milestone Aug 28, 2019
johanandren added a commit to johanandren/akka that referenced this pull request Aug 28, 2019
The idea is that `.recover { xyz => throw newException }` is common enough
not to log an ERROR message just because we didn't catch it in the Recover stage.

On the other hand, using `mapError` can be a better choice if you just want to
map the error (but there might be other occurrences where a partial function is not
enough to avoid throwing an error from recover).
@jrudolph jrudolph deleted the jrudolph:jr/don-t-log-when-rethrowing-in-recover branch Aug 28, 2019
johanandren added a commit that referenced this pull request Aug 28, 2019
The idea is that `.recover { xyz => throw newException }` is common enough
not to log an ERROR message just because we didn't catch it in the Recover stage.

On the other hand, using `mapError` can be a better choice if you just want to
map the error (but there might be other occurrences where a partial function is not
enough to avoid throwing an error from recover).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.