Class: Tarantool::Model::StaleObjectError

Inherits:
Error
  • Object
show all
Defined in:
tarantool-model/lib/tarantool/model/errors.rb

Overview

The row's locking column changed since the record was loaded.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(record, attempted_action) ⇒ StaleObjectError

Returns a new instance of StaleObjectError.



42
43
44
45
46
# File 'tarantool-model/lib/tarantool/model/errors.rb', line 42

def initialize(record, attempted_action)
  @record = record
  @attempted_action = attempted_action
  super("Attempted to #{attempted_action} a stale #{record.class.name} with key #{record.to_key.inspect}")
end

Instance Attribute Details

#attempted_action ⇒ Object (readonly)

Returns the value of attribute attempted_action.



40
41
42
# File 'tarantool-model/lib/tarantool/model/errors.rb', line 40

def attempted_action
  @attempted_action
end

#record ⇒ Object (readonly)

Returns the value of attribute record.



40
41
42
# File 'tarantool-model/lib/tarantool/model/errors.rb', line 40

def record
  @record
end