Package io.dropwizard.util
Class Throwables
- java.lang.Object
-
- io.dropwizard.util.Throwables
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Optional<Throwable>
findThrowableInChain(Predicate<Throwable> condition, @Nullable Throwable t)
Search an exception chain for an exception matching a given condition.
-
-
-
Method Detail
-
findThrowableInChain
public static Optional<Throwable> findThrowableInChain(Predicate<Throwable> condition, @Nullable Throwable t)
Search an exception chain for an exception matching a given condition.- Parameters:
condition
- The condition to match ont
- The head of the exception chain- Returns:
- An
Optional
containing the first match in the chain, starting from the head, or empty if no matching exception was found - Since:
- 2.1.0
-
-