Patch #25861 » 0002-adds-rescue-from-Encoding-UndefinedConversionError.patch
| 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)  | 
- « Previous
 - 1
 - 2
 - Next »