Exception: CSVConverter::Error
- Inherits:
-
StandardError
- Object
- StandardError
- CSVConverter::Error
- Defined in:
- lib/csv_converter.rb
Overview
Error holds error messages as well as details of the data being processed.
Instance Attribute Summary collapse
-
#details ⇒ Hash
readonly
Details of the data being processed when the error happened.
Instance Method Summary collapse
-
#initialize(message, details = {}) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(message, details = {}) ⇒ Error
A new instance of Error.
43 44 45 46 |
# File 'lib/csv_converter.rb', line 43 def initialize(, details = {}) @details = details super("#{} on: #{details}") end |
Instance Attribute Details
#details ⇒ Hash (readonly)
Details of the data being processed when the error happened. By default this includes:
filename: the name of the file being processed
row_num: number of the row being processed
entity: the name of the entity being processed as provided in the mappings
row: the raw data of the row being processed
attr: the name of the attribute being processed as provided in the mappings
Additionally it contains all the options provided to the converter in the mappings.
38 39 40 |
# File 'lib/csv_converter.rb', line 38 def details @details end |