Class Throwables


  • public final class Throwables
    extends Object
    Throwable utilities class.
    • Method Detail

      • find

        public static <T extends ThrowableOptional<T> find​(Throwable throwable,
                                                             Class<T> type)
        Return the top-most Throwable in the exception's chain that matches the given type.
        Type Parameters:
        T - throwable type
        Parameters:
        throwable - starting point of the search
        type - looked up throwable type
        Returns:
        the Optional throwable instance