Sha256: 4f529f4804f172ab2395c7646a62f0b9eb20619ba5560019790d784ca24d466a

Contents?: true

Size: 398 Bytes

Versions: 6

Compression:

Stored size: 398 Bytes

Contents

module StateOfTheNation
  class ConflictError < StandardError
    def initialize(record, conflicting_records)
      super(<<-MSG.strip_heredoc)
        Attempted to commit record

          #{record.inspect}

        But encountered a conflict with timestamps on the following records

          #{conflicting_records.map { |record| "- #{record.inspect}" }.join("\n")}

      MSG
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
state_of_the_nation-2.0.1 lib/state_of_the_nation/errors/conflict_error.rb
state_of_the_nation-2.0.0 lib/state_of_the_nation/errors/conflict_error.rb
state_of_the_nation-1.1.6 lib/state_of_the_nation/errors/conflict_error.rb
state_of_the_nation-1.1.5 lib/state_of_the_nation/errors/conflict_error.rb
state_of_the_nation-1.1.4 lib/state_of_the_nation/errors/conflict_error.rb
state_of_the_nation-1.1.3 lib/state_of_the_nation/errors/conflict_error.rb