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

Change CatchingRunnable to catch Exception instead of Throwable #527

Closed
sleberknight opened this issue Mar 24, 2021 · 0 comments · Fixed by #528
Closed

Change CatchingRunnable to catch Exception instead of Throwable #527

sleberknight opened this issue Mar 24, 2021 · 0 comments · Fixed by #528
Assignees
Labels
refactoring Code refactoring
Milestone

Comments

@sleberknight
Copy link
Member

See discussion #526 for full details.

NOTE: This is a breaking API change for version 0.21.0

The handleException method signature will change from:

CatchingRunnable#handleException(Throwable throwable)

to:

CatchingRunnable#handleException(Exception exception)

@sleberknight sleberknight added the refactoring Code refactoring label Mar 24, 2021
@sleberknight sleberknight added this to the 0.21.0 milestone Mar 24, 2021
@sleberknight sleberknight self-assigned this Mar 24, 2021
sleberknight added a commit that referenced this issue Mar 24, 2021
* CatchingRunnable#run now catches only Exception
* API breaking change: handleExceptionSafely changes from having a
  Throwable argument to Exception
* Rename test methods in CatchingRunnableTest to "should" form for
  better readability
* Change Error test to verify it does NOT catch Error
* Add test to verify Throwable (using Lombok's SneakyThrows feature) is
  not caught by CatchingRunnable

Closes #527
chrisrohr pushed a commit that referenced this issue Mar 24, 2021
* CatchingRunnable#run now catches only Exception
* API breaking change: handleExceptionSafely changes from having a
  Throwable argument to Exception
* Rename test methods in CatchingRunnableTest to "should" form for
  better readability
* Change Error test to verify it does NOT catch Error
* Add test to verify Throwable (using Lombok's SneakyThrows feature) is
  not caught by CatchingRunnable

Closes #527
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Code refactoring
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant