Package fr.enedis.chutney.tools
Interface ThrowingFunction<T,R,E extends Exception>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
-
Method Summary
Modifier and TypeMethodDescriptionsilence(ThrowingFunction<T, R, E> throwingFunction, Function<Exception, R> exceptionHandler) toUnchecked(ThrowingFunction<T, R, E> throwingFunction)
-
Method Details
-
apply
- Throws:
E
-
toUnchecked
static <T,R, Function<T,E extends Exception> R> toUnchecked(ThrowingFunction<T, R, throws UncheckedExceptionE> throwingFunction) - Throws:
UncheckedException- if givenThrowingFunctionthrows
-
silence
static <T,R, Function<T,E extends Exception> R> silence(ThrowingFunction<T, R, E> throwingFunction, Function<Exception, R> exceptionHandler)
-