Package io.dropwizard.util
Class Throwables
java.lang.Object
io.dropwizard.util.Throwables
Provides helper methods to work with
Throwable objects.- Since:
- 2.0
-
Method Summary
-
Method Details
-
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
Optionalcontaining the first match in the chain, starting from the head, or empty if no matching exception was found - Since:
- 2.1.0
-