DatabaseException class

An exception that may be thrown by Database, Collection, Document, SqlClient, and other database classes.

try {
  doSomeOperation();
} on DatabaseException catch (e) {
  // ...
}
Implemented types

Constructors

DatabaseException.custom({Document document, @required int code, @required String name, String message, Object error})
const
DatabaseException.databaseReadOnly({String message, Object error})
const
DatabaseException.found(Document document, {String message, Object error})
const
DatabaseException.internal({Document document, String message, Object error})
const
DatabaseException.notFound(Document document, {String message, Object error})
const
DatabaseException.sqlColumnValue({@required String database, @required String table, @required String column, @required Object value})
factory
DatabaseException.transactionUnsupported({Document document, String message, Object error})
const
DatabaseException.unavailable({Document document, String message, Object error})
const

Properties

code int
final
document Document
final
error Object
final
hashCode int
The hash code for this object. [...]
read-only, inherited
isUnavailable bool
read-only
message String
final
name String
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
override

Operators

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