LockAcquisitionException class
Exception thrown when a lock cannot be acquired because it's already held.
This exception is thrown by LockManager.tryAcquireThrow when attempting to acquire a lock that is already held by another client.
Example:
try {
await lockManager.tryAcquireThrow('users/user-1');
} on LockAcquisitionException catch (e) {
print('Could not acquire lock: ${e.documentPath}');
}
- Implemented types
Constructors
- LockAcquisitionException(String message, {String? documentPath})
-
Creates a new LockAcquisitionException.
const
Properties
- documentPath → String?
-
The path of the document whose lock could not be acquired.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- message → String
-
Additional details about the lock acquisition failure.
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