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

Add retry mechanism to CompoundRateProvider.getExchangeRate on failure #419

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Sep 1, 2024

  1. Add retry mechanism to CompoundRateProvider.getExchangeRate on failure

    Modified the getExchangeRate method in the CompoundRateProvider class to introduce a failFast parameter.
    
    Previously, the method would immediately throw an exception on the first provider failure. This change allows for a more flexible approach by adding an option to continue attempting to get an exchange rate from subsequent providers if failFast is set to false.
    
    - Added a new overloaded getExchangeRate method with a failFast boolean parameter.
    - If failFast is true, the method retains the original behavior of failing immediately on the first exception.
    - If failFast is false, the method logs a warning and continues to the next provider in case of an exception.
    
    This update addresses some of the limitations described in issue JavaMoney#385.
    sernamar committed Sep 1, 2024
    Configuration menu
    Copy the full SHA
    9b01e60 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d3fbfae View commit details
    Browse the repository at this point in the history