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

Turn RetryException into RuntimeException? #2

Open
dirkraft opened this issue Mar 12, 2013 · 7 comments
Open

Turn RetryException into RuntimeException? #2

dirkraft opened this issue Mar 12, 2013 · 7 comments
Labels

Comments

@dirkraft
Copy link
Contributor

pls, I like when my exceptions explode all the way to the top liek in php. kthx

@cyril265
Copy link

good thing there is a mechanism called javadoc to show which exceptions are thrown even if they are not checked.

@rholder
Copy link
Owner

rholder commented Mar 16, 2014

I should probably point out that @dirkraft likes to troll me occasionally in lolspeak. He and I have actually had discussions about switching the checked RetryException over to a RuntimeException, but it hasn't really been a priority (as evidenced by the lack of movement on this...). Additional opinions/comments/rants for this module shifting RetryException over to a RuntimeException are welcome here.

@cyril265
Copy link

I think the RetryException should stay checked because you always need to handle the case where all retries have failed.
But it's kind of annoying to be forced to handle the ExcecutionException. It will be rethrown or logged most of the times.

@marcomorain
Copy link

I like the checked exceptions too – if someone is going to the bother of using a Retrier, it's clear that they care about catching exceptions.

@andreisavu
Copy link

How about wrapping the cause of the ExecutionException in a RetryException? (and hide it completely from API consumers)

@JensRantil
Copy link

I, too, liked the checked exception.

@vromero
Copy link

vromero commented May 3, 2016

Checked exceptions leave the retry pretty much outside of the clean lamda world. Java 8 is here, and unless a Runtime Exception is used I (and probably others) will prefer other retry solutions.
Making assumptions over users desire of handling the exception is wrong, specially when the outcome is to force them to do the thing you might like.

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

No branches or pull requests

7 participants