Package com.fauna.exception
Class AbortException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.fauna.exception.FaunaException
-
- com.fauna.exception.ServiceException
-
- com.fauna.exception.AbortException
-
- All Implemented Interfaces:
java.io.Serializable
public class AbortException extends ServiceException
An exception that represents an abort error in Fauna. This exception extendsServiceException
and includes methods to retrieve the abort data.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbortException(QueryFailure response)
Constructs a newAbortException
with the specifiedQueryFailure
response.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
getAbort()
Returns the abort data as a top-levelObject
.<T> T
getAbort(java.lang.Class<T> clazz)
Returns the abort data decoded into the specified class, ornull
if there is no abort data.-
Methods inherited from class com.fauna.exception.ServiceException
getErrorCode, getQueryTags, getResponse, getSchemaVersion, getStats, getStatusCode, getSummary, getTxnTs
-
-
-
-
Constructor Detail
-
AbortException
public AbortException(QueryFailure response)
Constructs a newAbortException
with the specifiedQueryFailure
response.- Parameters:
response
- TheQueryFailure
object containing details about the aborted query.
-
-
Method Detail
-
getAbort
public java.lang.Object getAbort()
Returns the abort data as a top-levelObject
. This is primarily useful for debugging or situations where the type of abort data may be unknown.- Returns:
- An
Object
containing the abort data, ornull
if no data is present.
-
getAbort
public <T> T getAbort(java.lang.Class<T> clazz)
Returns the abort data decoded into the specified class, ornull
if there is no abort data. The abort data is cached upon retrieval to avoid redundant decoding.- Type Parameters:
T
- The type of the abort data.- Parameters:
clazz
- TheClass
to decode the abort data into.- Returns:
- The decoded abort data of type
T
, ornull
if no data is available.
-
-