|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.elasticsearch.ElasticSearchException
public class ElasticSearchException
A base class for all elasticsearch exceptions.
Constructor Summary | |
---|---|
ElasticSearchException(java.lang.String msg)
Construct a ElasticSearchException with the specified detail message. |
|
ElasticSearchException(java.lang.String msg,
java.lang.Throwable cause)
Construct a ElasticSearchException with the specified detail message
and nested exception. |
Method Summary | |
---|---|
boolean |
contains(java.lang.Class exType)
Check whether this exception contains an exception of the given type: either it is of the given class itself or it contains a nested cause of the given type. |
java.lang.String |
getDetailedMessage()
Return the detail message, including the message from the nested exception if there is one. |
java.lang.Throwable |
getMostSpecificCause()
Retrieve the most specific cause of this exception, that is, either the innermost cause (root cause) or this exception itself. |
java.lang.Throwable |
getRootCause()
Retrieve the innermost cause of this exception, if none, returns the current exception. |
RestStatus |
status()
Returns the rest status code associated with this exception. |
java.lang.Throwable |
unwrapCause()
Unwraps the actual cause from the exception for cases when the exception is a ElasticSearchWrapperException . |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ElasticSearchException(java.lang.String msg)
ElasticSearchException
with the specified detail message.
msg
- the detail messagepublic ElasticSearchException(java.lang.String msg, java.lang.Throwable cause)
ElasticSearchException
with the specified detail message
and nested exception.
msg
- the detail messagecause
- the nested exceptionMethod Detail |
---|
public RestStatus status()
public java.lang.Throwable unwrapCause()
ElasticSearchWrapperException
.
ExceptionsHelper.unwrapCause(Throwable)
public java.lang.String getDetailedMessage()
public java.lang.Throwable getRootCause()
public java.lang.Throwable getMostSpecificCause()
Differs from getRootCause()
in that it falls back
to the present exception if there is no root cause.
null
)public boolean contains(java.lang.Class exType)
exType
- the exception type to look for
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |