public class GridException extends Exception
| Constructor and Description |
|---|
GridException(String msg)
Creates new exception with given error message.
|
GridException(String msg,
Throwable cause)
Creates new exception with given error message and optional nested exception.
|
GridException(Throwable cause)
Creates new grid exception with given throwable as a cause and
source of error message.
|
| Modifier and Type | Method and Description |
|---|---|
<T extends Throwable> |
getCause(Class<T> cls)
Gets first exception of given class from
'cause' hierarchy if any. |
String |
getMessage() |
String |
getOriginalMessage()
Returns exception message.
|
boolean |
hasCause(Class<? extends Throwable>... cls)
Checks if this exception has given class in
'cause' hierarchy. |
String |
toString() |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTracepublic GridException(String msg)
msg - Error message.public GridException(Throwable cause)
cause - Non-null throwable cause.public boolean hasCause(@Nullable Class<? extends Throwable>... cls)
'cause' hierarchy.cls - Cause classes to check (if null or empty, false is returned).True if one of the causing exception is an instance of passed in classes,
false otherwise.@Nullable public <T extends Throwable> T getCause(@Nullable Class<T> cls)
'cause' hierarchy if any.cls - Cause class to get cause (if null, null is returned).null otherwise.public String getMessage()
Adds troubleshooting links if they where not added by below in cause hierarchy.
getMessage in class Throwablepublic String getOriginalMessage()
Unlike getMessage() this method never include troubleshooting links
to the result string.
Copyright © 2014. All rights reserved.