TransientDatabaseException class

Thrown by a Database when a statement failed for a reason that may go away on its own, and nothing of the failed statement (nor of the transaction it belongs to) was stored: the database was busy or locked, an I/O error occurred, the disk was full, or the storage behind the database is not reachable right now.

Firestore treats it as the JS SDK treats a failed IndexedDB transaction: the listen or write that needed the database fails with FirestoreErrorCode.unavailable, an acknowledgement from the backend is kept and stored again later, and the client goes offline and tries the database again with a backoff until it works. Any other error of a Database is fatal for the operation that ran into it.

Throw it only when the transaction did not take effect: Firestore runs the operation again, and a transaction that was in fact stored would then be applied twice. The openers in example/ show which SQLite errors qualify.

Implemented types

Constructors

TransientDatabaseException(String message, [Object? cause])
Creates the exception. cause is the error of the SQLite binding, if any.

Properties

cause → Object?
The original error, if any. Not part of toString: Firestore puts this exception into the message of the error the app gets and into its log, and the string of a binding's error may repeat the statement and its arguments (document contents, paths, user ids).
final
hashCode → int
The hash code for this object.
no setterinherited
message → String
What failed.
final
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.
override

Operators

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