summaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2021-02-27 07:46:35 +0000
committerGo MAEDA <maeda@farend.jp>2021-02-27 07:46:35 +0000
commit72d622dc9f38f9a429aee7d86667426cf57337ea (patch)
treed9be4925da6fd724733cd47ace5a482ea9b494c4 /app/controllers
parent2f3222e0bdaacae4a2d17224d61a18cb060e9031 (diff)
downloadredmine-72d622dc9f38f9a429aee7d86667426cf57337ea.tar.gz
redmine-72d622dc9f38f9a429aee7d86667426cf57337ea.zip
Display more detailed error message when attempting to import malformed CSV file (#34762).
Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@20756 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/imports_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/imports_controller.rb b/app/controllers/imports_controller.rb
index d295f5ebc..0e97e06c3 100644
--- a/app/controllers/imports_controller.rb
+++ b/app/controllers/imports_controller.rb
@@ -55,7 +55,7 @@ class ImportsController < ApplicationController
rescue CSV::MalformedCSVError, EncodingError => e
if e.is_a?(CSV::MalformedCSVError) && e.message !~ /Invalid byte sequence/
- flash.now[:error] = l(:error_invalid_csv_file_or_settings)
+ flash.now[:error] = l(:error_invalid_csv_file_or_settings, e.message)
else
flash.now[:error] = l(:error_invalid_file_encoding, :encoding => ERB::Util.h(@import.settings['encoding']))
end