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
ServiceException
and provides access to details about the constraint failures.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ConstraintFailureException(QueryFailure failure)
Constructs a newConstraintFailureException
with the specifiedQueryFailure
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConstraintFailure[]
getConstraintFailures()
Retrieves an array ofConstraintFailure
objects 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 newConstraintFailureException
with the specifiedQueryFailure
.- Parameters:
failure
- TheQueryFailure
object containing details about the constraint failure.
-
-
Method Detail
-
getConstraintFailures
public ConstraintFailure[] getConstraintFailures()
Retrieves an array ofConstraintFailure
objects representing the individual constraint failures.- Returns:
- An array of
ConstraintFailure
objects, ornull
if no constraint failures are present.
-
-