code: public static <T, R, E extends Exception> Function<T, R> rethrowFunction(FunctionWithExceptions<T, R, E> function) throws E {
          return t -> {
              try {
                  return function.apply(t);
              } catch (Exception exception) {
                  throwAsUnchecked(exception);
                  return null;
              }
          };
      }
docs: .map(rethrowFunction(name -> Class.forName(name))) or .map(rethrowFunction(Class::forName))