diff options
author | Go MAEDA <maeda@farend.jp> | 2019-05-25 06:50:25 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2019-05-25 06:50:25 +0000 |
commit | b0e17e8199bb40d0b1bed2c3dded355f439d8b3a (patch) | |
tree | 694b9ccde636af70a5aa515b62d1020a5eac9e62 /app/models/import.rb | |
parent | a12b7bcf2931045e63093adcd765d7c6e022fa05 (diff) | |
download | redmine-b0e17e8199bb40d0b1bed2c3dded355f439d8b3a.tar.gz redmine-b0e17e8199bb40d0b1bed2c3dded355f439d8b3a.zip |
Don't rescue Exception class (#31387).
Patch by Go MAEDA and Pavel Rosický.
git-svn-id: http://svn.redmine.org/redmine/trunk@18197 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/import.rb')
-rw-r--r-- | app/models/import.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/import.rb b/app/models/import.rb index ef4b0321e..721e812bd 100644 --- a/app/models/import.rb +++ b/app/models/import.rb @@ -67,7 +67,7 @@ class Import < ActiveRecord::Base begin content = File.read(filepath, 256) separator = [',', ';'].sort_by {|sep| content.count(sep) }.last - rescue Exception => e + rescue => e end end wrapper = '"' @@ -272,7 +272,7 @@ class Import < ActiveRecord::Base if file_exists? begin File.delete filepath - rescue Exception => e + rescue => e logger.error "Unable to delete file #{filepath}: #{e.message}" if logger end end |