Errors.Handling, Errors.Plugins, Errors.Rethrowing
Modifier | Constructor and Description |
---|---|
protected |
Handling(java.util.function.Consumer<java.lang.Throwable> error) |
Modifier and Type | Method and Description |
---|---|
<T> T |
getWithDefault(Throwing.Supplier<T> supplier,
T onFailure)
Attempts to call the given supplier, returns onFailure if there is a failure.
|
<T,R> java.util.function.Function<T,R> |
wrapWithDefault(Throwing.Function<T,R> function,
R onFailure)
Attempts to call the given function, and returns the given value on failure.
|
<T> java.util.function.Predicate<T> |
wrapWithDefault(Throwing.Predicate<T> function,
boolean onFailure)
Attempts to call the given function, and returns the given value on failure.
|
<T> java.util.function.Supplier<T> |
wrapWithDefault(Throwing.Supplier<T> supplier,
T onFailure)
Attempts to call the given supplier, and returns the given value on failure.
|
protected Handling(java.util.function.Consumer<java.lang.Throwable> error)
public <T> T getWithDefault(Throwing.Supplier<T> supplier, T onFailure)
public <T> java.util.function.Supplier<T> wrapWithDefault(Throwing.Supplier<T> supplier, T onFailure)
public <T,R> java.util.function.Function<T,R> wrapWithDefault(Throwing.Function<T,R> function, R onFailure)
public <T> java.util.function.Predicate<T> wrapWithDefault(Throwing.Predicate<T> function, boolean onFailure)