Package com.fauna.exception
Class ConstraintFailureException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.fauna.exception.FaunaException
-
- com.fauna.exception.ServiceException
-
- com.fauna.exception.ConstraintFailureException
-
- All Implemented Interfaces:
java.io.Serializable
public class ConstraintFailureException extends ServiceException
Exception representing a constraint failure in a Fauna query.This exception is typically thrown when a query violates a collection's check or unique constraints. Extends
ServiceExceptionand provides access to details about the constraint failures.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ConstraintFailureException(QueryFailure failure)Constructs a newConstraintFailureExceptionwith the specifiedQueryFailure.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConstraintFailure[]getConstraintFailures()Retrieves an array ofConstraintFailureobjects representing the individual constraint failures.-
Methods inherited from class com.fauna.exception.ServiceException
getErrorCode, getQueryTags, getResponse, getSchemaVersion, getStats, getStatusCode, getSummary, getTxnTs
-
-
-
-
Constructor Detail
-
ConstraintFailureException
public ConstraintFailureException(QueryFailure failure)
Constructs a newConstraintFailureExceptionwith the specifiedQueryFailure.- Parameters:
failure- TheQueryFailureobject containing details about the constraint failure.
-
-
Method Detail
-
getConstraintFailures
public ConstraintFailure[] getConstraintFailures()
Retrieves an array ofConstraintFailureobjects representing the individual constraint failures.- Returns:
- An array of
ConstraintFailureobjects, ornullif no constraint failures are present.
-
-