Class FunctionExceptionHandler

java.lang.Object
de.hybris.platform.cms2.common.functions.impl.FunctionExceptionHandler

public class FunctionExceptionHandler extends Object
Utility class to handle checked exceptions in lambdas.
  • Method Details

    • supplier

      public static <R> Supplier<R> supplier(ThrowableSupplier<R> supplier)
      Converts a ThrowableSupplier to a Supplier than can throw exceptions by converting them to unchecked exceptions.
      Parameters:
      supplier - A ThrowableSupplier than can throw any exception
      Returns:
      a Supplier of results.