lib/marty/data_importer.rb in marty-4.0.0.rc2 vs lib/marty/data_importer.rb in marty-5.1.0
- old
+ new
@@ -75,13 +75,13 @@
# skip lines which are all nil
next :blank if row.to_hash.values.none?
Marty::DataConversion.create_or_update(klass, row, dt)
end
- rescue StandardError => exc
+ rescue StandardError => e
# to find problems with the importer, comment out the rescue block
- raise Error.new(exc.to_s, [eline])
+ raise Error.new(e.to_s, [eline])
end
ids = {}
# raise an error if record referenced more than once.
res.each_with_index do |(op, id), line|
@@ -94,11 +94,11 @@
begin
# Validate affected rows if necessary
klass.send(validation_function.to_sym, ids.keys) if
validation_function
- rescue StandardError => exc
- raise Error.new(exc.to_s, [])
+ rescue StandardError => e
+ raise Error.new(e.to_s, [])
end
remainder_ids = cleaner_ids - ids.keys
raise Error.