@Test void handle() { final AtomicBoolean bo = new AtomicBoolean(false); throwRuntime .handle(throwable -> { bo.set(true); }); Assertions.assertTrue(bo.get()); countOnly .handle(throwable -> { bo.set(false); }); Assertions.assertTrue(bo.get()); }
public void handle(Consumer<Throwable> consumer) { try { callable.call(); } catch (Throwable t) { consumer.accept(t); } }
NameToBeDefined2 implements Callable<V> { public void handle(Consumer<Throwable> consumer) { try { callable.call(); } catch (Throwable t) { consumer.accept(t); } } }
NameToBeDefined2 implements Callable<V> { public void handle(Consumer<Throwable> consumer) { try { callable.call(); } catch (Throwable t) { consumer.accept(t); } } protected  NameToBeDefined2(Callable<V> callableToDecorate); }
NameToBeDefined2 implements Callable<V> { public void handle(Consumer<Throwable> consumer) { try { callable.call(); } catch (Throwable t) { consumer.accept(t); } } protected  NameToBeDefined2(Callable<V> callableToDecorate); static NameToBeDefined2<V> wrap(final Callable<V> callableToDecorate); NameToBeDefined2<V> retryOnBusy(); NameToBeDefined2<V> retryOnBusy(final long delayMillis); NameToBeDefined2<V> retryOnBusy(final long... delayMillis); NameToBeDefined2<V> retryOnBusy(final long delayMillis, final int retryTimes); NameToBeDefined2<V> retryOnError(final long delayMillis, final EdsdkError errors); NameToBeDefined2<V> retryOnError(final long delayMillis, final EdsdkError... errors); NameToBeDefined2<V> retryOnError(final long delayMillis, final int retryTimes, final EdsdkError errors); NameToBeDefined2<V> retryOnError(final long delayMillis, final int retryTimes, final EdsdkError... errors); NameToBeDefined2<V> retryOnError(final long delayMillis, final int retryTimes, final List<EdsdkError> errors); NameToBeDefined2<V> runOnError(final Callable<V> runOnError, final EdsdkError error); NameToBeDefined2<V> runOnError(final Callable<V> runOnError, final EdsdkError... errors); NameToBeDefined2<V> runOnError(final Callable<V> runOnError, final List<EdsdkError> errors); @Override V call(); void handle(Consumer<Throwable> consumer); V handle(Function<Throwable, V> function); R handle(BiFunction<V, Throwable, R> function); }
NameToBeDefined2 implements Callable<V> { public void handle(Consumer<Throwable> consumer) { try { callable.call(); } catch (Throwable t) { consumer.accept(t); } } protected  NameToBeDefined2(Callable<V> callableToDecorate); static NameToBeDefined2<V> wrap(final Callable<V> callableToDecorate); NameToBeDefined2<V> retryOnBusy(); NameToBeDefined2<V> retryOnBusy(final long delayMillis); NameToBeDefined2<V> retryOnBusy(final long... delayMillis); NameToBeDefined2<V> retryOnBusy(final long delayMillis, final int retryTimes); NameToBeDefined2<V> retryOnError(final long delayMillis, final EdsdkError errors); NameToBeDefined2<V> retryOnError(final long delayMillis, final EdsdkError... errors); NameToBeDefined2<V> retryOnError(final long delayMillis, final int retryTimes, final EdsdkError errors); NameToBeDefined2<V> retryOnError(final long delayMillis, final int retryTimes, final EdsdkError... errors); NameToBeDefined2<V> retryOnError(final long delayMillis, final int retryTimes, final List<EdsdkError> errors); NameToBeDefined2<V> runOnError(final Callable<V> runOnError, final EdsdkError error); NameToBeDefined2<V> runOnError(final Callable<V> runOnError, final EdsdkError... errors); NameToBeDefined2<V> runOnError(final Callable<V> runOnError, final List<EdsdkError> errors); @Override V call(); void handle(Consumer<Throwable> consumer); V handle(Function<Throwable, V> function); R handle(BiFunction<V, Throwable, R> function);  }