Project

General

Profile

Patch #25861 » 0002-adds-rescue-from-Encoding-UndefinedConversionError.patch

fix - Jens Krämer, 2017-05-16 11:06

View differences:

app/controllers/imports_controller.rb
rescue CSV::MalformedCSVError => e
flash.now[:error] = l(:error_invalid_csv_file_or_settings)
rescue ArgumentError, Encoding::InvalidByteSequenceError => e
rescue ArgumentError, Encoding::InvalidByteSequenceError, Encoding::UndefinedConversionError => e
flash.now[:error] = l(:error_invalid_file_encoding, :encoding => ERB::Util.h(@import.settings['encoding']))
rescue SystemCallError => e
flash.now[:error] = l(:error_can_not_read_import_file)
(2-2/2)