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
52 52

  
53 53
  rescue CSV::MalformedCSVError => e
54 54
    flash.now[:error] = l(:error_invalid_csv_file_or_settings)
55
  rescue ArgumentError, Encoding::InvalidByteSequenceError => e
55
  rescue ArgumentError, Encoding::InvalidByteSequenceError, Encoding::UndefinedConversionError => e
56 56
    flash.now[:error] = l(:error_invalid_file_encoding, :encoding => ERB::Util.h(@import.settings['encoding']))
57 57
  rescue SystemCallError => e
58 58
    flash.now[:error] = l(:error_can_not_read_import_file)
(2-2/2)