Git Product home page Git Product logo

Comments (7)

cyril265 avatar cyril265 commented on June 25, 2024

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

from guava-retrying.

rholder avatar rholder commented on June 25, 2024

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.

from guava-retrying.

cyril265 avatar cyril265 commented on June 25, 2024

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.

from guava-retrying.

marcomorain avatar marcomorain commented on June 25, 2024

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.

from guava-retrying.

andreisavu avatar andreisavu commented on June 25, 2024

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

from guava-retrying.

JensRantil avatar JensRantil commented on June 25, 2024

I, too, liked the checked exception.

from guava-retrying.

vromero avatar vromero commented on June 25, 2024

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.

from guava-retrying.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.