OperationException class abstract final Exceptions

Thrown when the database reports an error while executing an operation.

An operation could fail for a number of reasons, such as:

  • Type cast error in the database (e.g. CAST('NaN' AS INT)),
  • General runtime error in the SQL evaluation (e.g. division by zero),
  • Constraint violation (e.g. UNIQUE constraint violation),
  • Deadlock, timeout in the database, etc.

An OperationException means that the database failed to execute the SQL query/command it was given. If this happens inside a transaction it's best to let it propagate up to Database.transact, such that the transaction is rolled back, this will in turn cause Database.transact to throw a TransactionAbortedException.

Inheritance
Implementers

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited