code: public static <T> Callable<T> callable(CheckedCallable<T> callable, Consumer<Throwable> handler) {
          return () -> {
              try {
                  return callable.call();
              }
              catch (Throwable e) {
                  handler.accept(e);
  
                  throw new IllegalStateException("Exception handler must throw a RuntimeException", e);
              }
          };
      }
docs: Wrap a {@link CheckedCallable<T>} in a {@link Callable<T>} with a custom handler for checked exceptions.
  <p>
  Example:
  <code><pre>
  Executors.newFixedThreadPool(1).submit(Unchecked.callable(
  () -> {
  throw new Exception("Cannot execute this task");
  },
  e -> {
  throw new IllegalStateException(e);
  }
  )).get();
  </pre></code>