docs: @SneakyThrows
      public static <R> Supplier<R> doAndHandle(final Supplier<R> function, final CheckedFunction<Throwable, R> errorHandler) {
          return () -> {
              try {
                  return function.get();
              } catch (final Throwable e) {
                  LOGGER.warn(e.getMessage(), e);
                  try {
                      return errorHandler.apply(e);
                  } catch (final Throwable ex) {
                      throw new IllegalArgumentException(ex.getMessage());
                  }
              }
          };
      }