Class ThrowableClassifier


  • public class ThrowableClassifier
    extends Object
    Helper class, given a exception do the classification.
    • Constructor Detail

      • ThrowableClassifier

        public ThrowableClassifier()
    • Method Detail

      • findThrowableOfThrowableType

        public static Optional<Throwable> findThrowableOfThrowableType​(Throwable throwable,
                                                                       ThrowableType throwableType)
        Checks whether a throwable chain contains a specific throwable type and returns the corresponding throwable.
        Parameters:
        throwable - the throwable chain to check.
        throwableType - the throwable type to search for in the chain.
        Returns:
        Optional throwable of the throwable type if available, otherwise empty