Package org.apache.ignite
Class IgniteCheckedException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.apache.ignite.IgniteCheckedException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
IgniteAuthenticationException
,IgniteSpiOperationTimeoutException
,QueryCancelledException
public class IgniteCheckedException extends Exception
General grid exception. This exception is used to indicate any error condition within Grid.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description IgniteCheckedException()
Create empty exception.IgniteCheckedException(String msg)
Creates new exception with given error message.IgniteCheckedException(String msg, @Nullable Throwable cause)
Creates new exception with given error message and optional nested exception.IgniteCheckedException(String msg, @Nullable Throwable cause, boolean writableStackTrace)
Creates new exception with given error message and optional nested exception.IgniteCheckedException(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 Description <T extends Throwable>
TgetCause(@Nullable Class<T> cls)
Gets first exception of given class from'cause'
hierarchy if any.boolean
hasCause(@Nullable 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
-
-
-
-
Constructor Detail
-
IgniteCheckedException
public IgniteCheckedException()
Create empty exception.
-
IgniteCheckedException
public IgniteCheckedException(String msg)
Creates new exception with given error message.- Parameters:
msg
- Error message.
-
IgniteCheckedException
public IgniteCheckedException(Throwable cause)
Creates new grid exception with given throwable as a cause and source of error message.- Parameters:
cause
- Non-null throwable cause.
-
IgniteCheckedException
public IgniteCheckedException(String msg, @Nullable @Nullable Throwable cause, boolean writableStackTrace)
Creates new exception with given error message and optional nested exception.- Parameters:
msg
- Error message.cause
- Optional nested exception (can benull
).writableStackTrace
- whether or not the stack trace should be writable
-
-
Method Detail
-
hasCause
@SafeVarargs public final boolean hasCause(@Nullable @Nullable Class<? extends Throwable>... cls)
Checks if this exception has given class in'cause'
hierarchy.- Parameters:
cls
- Cause classes to check (ifnull
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 exception cause.- Parameters:
cls
- Cause class to get cause (ifnull
,null
is returned).- Returns:
- First causing exception of passed in class,
null
otherwise.
-
-