Skip to content

InvariantViolationException

InvariantViolationException is a RuntimeException (Java) that is reported when data does not match the rules of a table (using Constraints).

Creating Instance

InvariantViolationException takes the following to be created:

  • Error Message

InvariantViolationException is created when:

Creating InvariantViolationException

apply creates a InvariantViolationException for the given constraint: Check or NotNull.

Check

apply(
  constraint: Constraints.Check,
  values: Map[String, Any]): InvariantViolationException

Check

CHECK constraint [name] [sql] violated by row with values:
 - [column] : [value]

NotNull

apply(
  constraint: Constraints.NotNull): InvariantViolationException

NotNull

NOT NULL constraint violated for column: [name]

Usage

apply is used when: