Exception: Acta::VersionConflict
- Defined in:
- lib/acta/errors.rb
Instance Attribute Summary collapse
-
#actual_version ⇒ Object
readonly
Returns the value of attribute actual_version.
-
#expected_version ⇒ Object
readonly
Returns the value of attribute expected_version.
-
#stream_key ⇒ Object
readonly
Returns the value of attribute stream_key.
-
#stream_type ⇒ Object
readonly
Returns the value of attribute stream_type.
Instance Method Summary collapse
-
#initialize(stream_type:, stream_key:, expected_version:, actual_version:) ⇒ VersionConflict
constructor
A new instance of VersionConflict.
Constructor Details
#initialize(stream_type:, stream_key:, expected_version:, actual_version:) ⇒ VersionConflict
Returns a new instance of VersionConflict.
40 41 42 43 44 45 46 47 48 49 |
# File 'lib/acta/errors.rb', line 40 def initialize(stream_type:, stream_key:, expected_version:, actual_version:) @stream_type = stream_type @stream_key = stream_key @expected_version = expected_version @actual_version = actual_version super( "Version conflict on stream #{stream_type}/#{stream_key}: " \ "expected version #{expected_version}, stream is at version #{actual_version}" ) end |
Instance Attribute Details
#actual_version ⇒ Object (readonly)
Returns the value of attribute actual_version.
38 39 40 |
# File 'lib/acta/errors.rb', line 38 def actual_version @actual_version end |
#expected_version ⇒ Object (readonly)
Returns the value of attribute expected_version.
38 39 40 |
# File 'lib/acta/errors.rb', line 38 def expected_version @expected_version end |
#stream_key ⇒ Object (readonly)
Returns the value of attribute stream_key.
38 39 40 |
# File 'lib/acta/errors.rb', line 38 def stream_key @stream_key end |
#stream_type ⇒ Object (readonly)
Returns the value of attribute stream_type.
38 39 40 |
# File 'lib/acta/errors.rb', line 38 def stream_type @stream_type end |