@Test void handleWithReturnValue() { final Boolean handle = throwRuntime .handle(throwable -> true); Assertions.assertTrue(handle); final Boolean handle2 = countOnly .handle(throwable -> true); Assertions.assertNull(handle2); }
public void handle(Consumer<Throwable> consumer) { try { runnable.run(); } catch (Throwable t) { consumer.accept(t); } }
NameToBeDefined implements Runnable { public void handle(Consumer<Throwable> consumer) { try { runnable.run(); } catch (Throwable t) { consumer.accept(t); } } }
NameToBeDefined implements Runnable { public void handle(Consumer<Throwable> consumer) { try { runnable.run(); } catch (Throwable t) { consumer.accept(t); } } protected  NameToBeDefined(Runnable runnableToDecorate); }
NameToBeDefined implements Runnable { public void handle(Consumer<Throwable> consumer) { try { runnable.run(); } catch (Throwable t) { consumer.accept(t); } } protected  NameToBeDefined(Runnable runnableToDecorate); static NameToBeDefined wrap(final Runnable runnableToDecorate); NameToBeDefined retryOnBusy(); NameToBeDefined retryOnBusy(final long delayMillis); NameToBeDefined retryOnBusy(final long... delayMillis); NameToBeDefined retryOnBusy(final long delayMillis, final int retryTimes); NameToBeDefined retryOnError(final long delayMillis, final EdsdkError errors); NameToBeDefined retryOnError(final long delayMillis, final EdsdkError... errors); NameToBeDefined retryOnError(final long delayMillis, final int retryTimes, final EdsdkError errors); NameToBeDefined retryOnError(final long delayMillis, final int retryTimes, final EdsdkError... errors); NameToBeDefined retryOnError(final long delayMillis, final int retryTimes, final List<EdsdkError> errors); NameToBeDefined runOnError(final Runnable runOnError, final EdsdkError error); NameToBeDefined runOnError(final Runnable runOnError, final EdsdkError... errors); NameToBeDefined runOnError(final Runnable runOnError, final List<EdsdkError> errors); @Override void run(); void handle(Consumer<Throwable> consumer); R handle(Function<Throwable, R> function); }
NameToBeDefined implements Runnable { public void handle(Consumer<Throwable> consumer) { try { runnable.run(); } catch (Throwable t) { consumer.accept(t); } } protected  NameToBeDefined(Runnable runnableToDecorate); static NameToBeDefined wrap(final Runnable runnableToDecorate); NameToBeDefined retryOnBusy(); NameToBeDefined retryOnBusy(final long delayMillis); NameToBeDefined retryOnBusy(final long... delayMillis); NameToBeDefined retryOnBusy(final long delayMillis, final int retryTimes); NameToBeDefined retryOnError(final long delayMillis, final EdsdkError errors); NameToBeDefined retryOnError(final long delayMillis, final EdsdkError... errors); NameToBeDefined retryOnError(final long delayMillis, final int retryTimes, final EdsdkError errors); NameToBeDefined retryOnError(final long delayMillis, final int retryTimes, final EdsdkError... errors); NameToBeDefined retryOnError(final long delayMillis, final int retryTimes, final List<EdsdkError> errors); NameToBeDefined runOnError(final Runnable runOnError, final EdsdkError error); NameToBeDefined runOnError(final Runnable runOnError, final EdsdkError... errors); NameToBeDefined runOnError(final Runnable runOnError, final List<EdsdkError> errors); @Override void run(); void handle(Consumer<Throwable> consumer); R handle(Function<Throwable, R> function);  }