WrongExpectedVersionException class

Exception thrown if the expected version specified on an operation does not match the version of the stream when the operation was attempted.
Implemented types

Constructors

WrongExpectedVersionException.fromError(GrpcError error)
Constructs a new instance of WrongExpectedVersionException with the expected and actual versions if available.
factory
WrongExpectedVersionException.fromRevisions(String streamId, {required StreamRevision actualStreamRevision, required StreamRevision expectedStreamRevision, Exception? cause})
Constructs a new instance of WrongExpectedVersionException with the expected and actual versions if available.
factory
WrongExpectedVersionException.fromStateAndRevision(StreamState expectedStreamState, StreamRevision actualStreamRevision)
Constructs a new instance of WrongExpectedVersionException with the expected and actual versions if available.
factory

Properties

actualStreamRevision StreamRevision
The current StreamRevision of the stream that the operation was attempted on.
final
actualVersion int?
If available, the current version of the stream that the operation was attempted on.
no setter
cause Exception?
If available, the Exception that caused this exception.
final
expectedStreamRevision StreamRevision
If available, the expected version specified for the operation that failed.
final
expectedStreamStateType StreamStateType?
If available, the expected StreamStateType specified for the operation that failed.
final
expectedVersion int?
If available, the expected version specified for the operation that failed.
no setter
hashCode int
The hash code for this object.
no setterinherited
message String
Exception message
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
streamId String
The stream identifier.
final

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