From b0e17e8199bb40d0b1bed2c3dded355f439d8b3a Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Sat, 25 May 2019 06:50:25 +0000 Subject: Don't rescue Exception class (#31387). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by Go MAEDA and Pavel Rosický. git-svn-id: http://svn.redmine.org/redmine/trunk@18197 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/import.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/models/import.rb') 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 -- cgit v1.2.3