Exception: PaperlessToXero::RowError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/paperless_to_xero/errors.rb

Direct Known Subclasses

BadItem, IncorrectNumberOfColumns

Instance Method Summary collapse

Constructor Details

#initialize(line_number, row, explanation = "") ⇒ RowError

Returns a new instance of RowError.



4
5
6
# File 'lib/paperless_to_xero/errors.rb', line 4

def initialize(line_number, row, explanation = "")
  @line_number, @row, @explanation = line_number, row, explanation
end

Instance Method Details

#to_sObject



8
9
10
# File 'lib/paperless_to_xero/errors.rb', line 8

def to_s
  "Error processing line #{@line_number.to_s}: #{@explanation}. Row was #{@row.inspect}"
end