org.apache.ignite

## Class IgniteException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - org.apache.ignite.IgniteException

- All Implemented Interfaces:
    Serializable
  Direct Known Subclasses:
    BinaryObjectException, ClusterTopologyException, ColumnIndexException, ComputeExecutionRejectedException, ComputeJobFailoverException, ComputeTaskCancelledException, ComputeTaskTimeoutException, ComputeUserUndeclaredException, EmptyFileException, FileParsingException, GridifyRuntimeException, IgniteCacheRestartingException, IgniteClientDisconnectedException, IgniteDataStreamerTimeoutException, IgniteDeploymentException, IgniteFutureCancelledException, IgniteFutureTimeoutException, IgniteInterruptedException, IgniteSpiException, IllegalFeatureTypeException, IllegalLabelTypeException, IndexException, MathRuntimeException, NoLabelVectorException, NonDoubleVectorException, PluginNotFoundException, PluginValidationException, QueryRetryException, RowIndexException, SecurityException, ServiceDeploymentException, TransactionException, UndefinedLabelException, UnknownCategorialValueException, UnsupportedOperationException, UnsupportedSparkModelException

      public class IgniteException
      extends RuntimeException

  General grid exception. This exception is used to indicate any error condition within Grid.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `IgniteException()` Create empty exception.
    `IgniteException(String msg)` Creates new exception with given error message.
    `IgniteException(String msg, @Nullable Throwable cause)` Creates new exception with given error message and optional nested exception.
    `IgniteException(Throwable cause)` Creates new grid exception with given throwable as a cause and source of error message.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T extends Throwable> T` | `getCause(@Nullable Class<T> cls)` Gets first exception of given class from `'cause'` hierarchy if any.
    `boolean` | `hasCause(Class<? extends Throwable>... cls)` Checks if this exception has given class in `'cause'` hierarchy.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Throwable

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### 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,
                                 @Nullable
                                 @Nullable 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(@Nullable
                                                     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

          @Nullable
          public <T extends Throwable> T getCause(@Nullable
                                                            @Nullable Class<T> cls)

      Gets first exception of given class from `'cause'` hierarchy if any.
      Type Parameters:
        `T` - Type of the causing exception.
      Parameters:
        `cls` - Cause class to get cause (if `null`, `null` is returned).
      Returns:
        First causing exception of passed in class, `null` otherwise.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Throwable`

2022 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.13.0
Release Date | : April 20 2022