Exception: PgEventstore::WrongExpectedRevisionError

Inherits:
Error
  • Object
show all
Defined in:
lib/pg_eventstore/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Error

#as_json, #to_h

Constructor Details

#initialize(revision:, expected_revision:, stream:) ⇒ WrongExpectedRevisionError

Returns a new instance of WrongExpectedRevisionError.

Parameters:



62
63
64
65
66
67
# File 'lib/pg_eventstore/errors.rb', line 62

def initialize(revision:, expected_revision:, stream:)
  @revision = revision
  @expected_revision = expected_revision
  @stream = stream
  super(user_friendly_message)
end

Instance Attribute Details

#expected_revisionObject

Returns the value of attribute expected_revision.



57
58
59
# File 'lib/pg_eventstore/errors.rb', line 57

def expected_revision
  @expected_revision
end

#revisionObject

Returns the value of attribute revision.



54
55
56
# File 'lib/pg_eventstore/errors.rb', line 54

def revision
  @revision
end

#streamObject

Returns the value of attribute stream.



51
52
53
# File 'lib/pg_eventstore/errors.rb', line 51

def stream
  @stream
end