@Test public void errors() throws Exception { final BusinessException e = new BusinessException("unhandled"); final Retry<String> retry = new Retry<>( () -> { throw e; }, 2, 0 ); try { retry.perform(); } catch (BusinessException ex) { } assertThat( retry.errors(), hasItem(e) ); }
public List<Exception> errors() { return Collections.unmodifiableList(this.errors); }
Retry implements BusinessOperation<T> { public List<Exception> errors() { return Collections.unmodifiableList(this.errors); } }
Retry implements BusinessOperation<T> { public List<Exception> errors() { return Collections.unmodifiableList(this.errors); } @SafeVarargs  Retry(
            BusinessOperation<T> op,
            int maxAttempts,
            long delay,
            Predicate<Exception>... ignoreTests
    ); }
Retry implements BusinessOperation<T> { public List<Exception> errors() { return Collections.unmodifiableList(this.errors); } @SafeVarargs  Retry(
            BusinessOperation<T> op,
            int maxAttempts,
            long delay,
            Predicate<Exception>... ignoreTests
    ); List<Exception> errors(); int attempts(); @Override T perform(); }
Retry implements BusinessOperation<T> { public List<Exception> errors() { return Collections.unmodifiableList(this.errors); } @SafeVarargs  Retry(
            BusinessOperation<T> op,
            int maxAttempts,
            long delay,
            Predicate<Exception>... ignoreTests
    ); List<Exception> errors(); int attempts(); @Override T perform();  }