Exception: ZeroRuby::OutOfOrderMutationError
- Defined in:
- lib/zero_ruby/errors.rb
Overview
Raised when mutations arrive out of order
Instance Attribute Summary collapse
-
#client_id ⇒ Object
readonly
Returns the value of attribute client_id.
-
#expected_id ⇒ Object
readonly
Returns the value of attribute expected_id.
-
#received_id ⇒ Object
readonly
Returns the value of attribute received_id.
Attributes inherited from Error
Instance Method Summary collapse
- #error_type ⇒ Object
-
#initialize(client_id:, received_id:, expected_id:) ⇒ OutOfOrderMutationError
constructor
A new instance of OutOfOrderMutationError.
Constructor Details
#initialize(client_id:, received_id:, expected_id:) ⇒ OutOfOrderMutationError
Returns a new instance of OutOfOrderMutationError.
79 80 81 82 83 84 |
# File 'lib/zero_ruby/errors.rb', line 79 def initialize(client_id:, received_id:, expected_id:) @client_id = client_id @received_id = received_id @expected_id = expected_id super("Client #{client_id} sent mutation ID #{received_id} but expected #{expected_id}") end |
Instance Attribute Details
#client_id ⇒ Object (readonly)
Returns the value of attribute client_id.
77 78 79 |
# File 'lib/zero_ruby/errors.rb', line 77 def client_id @client_id end |
#expected_id ⇒ Object (readonly)
Returns the value of attribute expected_id.
77 78 79 |
# File 'lib/zero_ruby/errors.rb', line 77 def expected_id @expected_id end |
#received_id ⇒ Object (readonly)
Returns the value of attribute received_id.
77 78 79 |
# File 'lib/zero_ruby/errors.rb', line 77 def received_id @received_id end |
Instance Method Details
#error_type ⇒ Object
86 87 88 |
# File 'lib/zero_ruby/errors.rb', line 86 def error_type "ooo" end |