Exception: StateOfTheNation::ConflictError
- Inherits:
-
StandardError
- Object
- StandardError
- StateOfTheNation::ConflictError
- Defined in:
- lib/state_of_the_nation/errors/conflict_error.rb
Instance Method Summary collapse
-
#initialize(record, conflicting_records) ⇒ ConflictError
constructor
A new instance of ConflictError.
Constructor Details
#initialize(record, conflicting_records) ⇒ ConflictError
Returns a new instance of ConflictError.
3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/state_of_the_nation/errors/conflict_error.rb', line 3 def initialize(record, conflicting_records) super(" Attempted to commit record\n\n \#{record.inspect}\n\n But encountered a conflict with timestamps on the following records\n\n \#{conflicting_records.map { |record| \"- \#{record.inspect}\" }.join(\"\\n\")}\n\n MSG\nend\n".strip_heredoc) |