ItemNotFoundException class
Exception thrown when trying to access an item that does not exist.
This exception is thrown by IWorkDb.update and IWorkDb.delete when the specified item cannot be found.
Example:
try {
await db.update(ItemWithId(id: 'nonexistent', collection: 'users', item: {}));
} on ItemNotFoundException catch (e) {
print('Item ${e.id} not found in ${e.collection}');
}
- Implemented types
Constructors
- ItemNotFoundException({required String id, required String collection})
-
Creates a new ItemNotFoundException.
const
Properties
- collection → String
-
The collection where the item was expected.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
The id of the item that was not found.
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