Module: CSVI18n::Ext

Defined in:
lib/csv_i18n/ext.rb

Instance Method Summary collapse

Instance Method Details

#shiftObject

Redefine the shift method to catch the exception and attempt to return a translated version of the error message using I18n.t



5
6
7
8
9
# File 'lib/csv_i18n/ext.rb', line 5

def shift
  super
rescue ::CSV::MalformedCSVError => exception
  raise $!, translated_exception_message(exception.message), $!.backtrace
end