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 extendsServiceExceptionand includes methods to retrieve the abort data.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbortException(QueryFailure response)Constructs a newAbortExceptionwith the specifiedQueryFailureresponse.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetAbort()Returns the abort data as a top-levelObject.<T> TgetAbort(java.lang.Class<T> clazz)Returns the abort data decoded into the specified class, ornullif 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 newAbortExceptionwith the specifiedQueryFailureresponse.- Parameters:
response- TheQueryFailureobject 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
Objectcontaining the abort data, ornullif no data is present.
-
getAbort
public <T> T getAbort(java.lang.Class<T> clazz)
Returns the abort data decoded into the specified class, ornullif 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- TheClassto decode the abort data into.- Returns:
- The decoded abort data of type
T, ornullif no data is available.
-
-