public interface ExceptionClassifier
| Modifier and Type | Method and Description |
|---|---|
Throwable |
classify(Throwable throwable)
Classifies the given
throwable into temporary and permanent exceptions. |
default <T> T |
classifyExceptionally(Throwable throwable)
Provides a function that classifies its argument using
classify(Throwable) and throws it. |
static ExceptionClassifier |
create(Collection<Predicate<Throwable>> predicates) |
static ExceptionClassifier |
create(Predicate<Throwable>... predicates) |
static ExceptionClassifier |
createDefault() |
Throwable classify(Throwable throwable)
throwable into temporary and permanent exceptions.throwable - the throwableTemporaryException with the given
throwable as its cause, if it's considered temporarydefault <T> T classifyExceptionally(Throwable throwable) throws Throwable
classify(Throwable) and throws it. This function
is supposed to be used in conjunction with CompletableFuture.exceptionally(Function).T - generic return typethrowable - the throwableThrowableCompletableFuture.exceptionally(Function)static ExceptionClassifier createDefault()
@SafeVarargs static ExceptionClassifier create(Predicate<Throwable>... predicates)
static ExceptionClassifier create(Collection<Predicate<Throwable>> predicates)
Copyright © 2015–2017 Zalando SE. All rights reserved.