Class IgniteException

    • Constructor Detail

      • IgniteException

        public IgniteException()
        Create empty exception.
      • IgniteException

        public IgniteException​(String msg)
        Creates new exception with given error message.
        Parameters:
        msg - Error message.
      • IgniteException

        public IgniteException​(Throwable cause)
        Creates new grid exception with given throwable as a cause and source of error message.
        Parameters:
        cause - Non-null throwable cause.
      • IgniteException

        public IgniteException​(String msg,
                               Throwable cause)
        Creates new exception with given error message and optional nested exception.
        Parameters:
        msg - Error message.
        cause - Optional nested exception (can be null).
    • Method Detail

      • hasCause

        @SafeVarargs
        public final boolean hasCause​(Class<? extends Throwable>... cls)
        Checks if this exception has given class in 'cause' hierarchy.
        Parameters:
        cls - Cause classes to check (if null or empty, false is returned).
        Returns:
        True if one of the causing exception is an instance of passed in classes, false otherwise.
      • getCause

        public <T extends Throwable> T getCause​(Class<T> cls)
        Gets first exception of given class from 'cause' hierarchy if any.
        Parameters:
        cls - Cause class to get cause (if null, null is returned).
        Returns:
        First causing exception of passed in class, null otherwise.