class E3DB::ConflictError

Exception thrown by {Client#update} when a concurrent modification is detected. Upon catching this exception, a client should re-fetch the affected record and retry the update operation.

Public Class Methods

new(record) click to toggle source
Calls superclass method
# File lib/e3db/client.rb, line 42
def initialize(record)
  if record.is_a? E3DB::Record
    super('Conflict updating record: ' + record.meta.record_id)
  else
    super('Conflict updating record: ' + record)
  end

  @record = record
end

Public Instance Methods

record() click to toggle source

Return the record from the failing update attempt.

@return [Record] the affected record

# File lib/e3db/client.rb, line 55
def record
  @record
end