Exception: Dynamoid::Errors::StaleObjectError

Inherits:
ConditionalCheckFailedException show all
Defined in:
lib/dynamoid/errors.rb

Instance Attribute Summary collapse

Attributes inherited from ConditionalCheckFailedException

#inner_exception

Instance Method Summary collapse

Constructor Details

#initialize(record, attempted_action) ⇒ StaleObjectError

Returns a new instance of StaleObjectError.



56
57
58
59
60
# File 'lib/dynamoid/errors.rb', line 56

def initialize(record, attempted_action)
  super("Attempted to #{attempted_action} a stale object #{record}")
  @record = record
  @attempted_action = attempted_action
end

Instance Attribute Details

#attempted_actionObject (readonly)

Returns the value of attribute attempted_action.



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

def attempted_action
  @attempted_action
end

#recordObject (readonly)

Returns the value of attribute record.



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

def record
  @record
end