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 /lib/tasks | |
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 'lib/tasks')
-rw-r--r-- | lib/tasks/email.rake | 2 | ||||
-rw-r--r-- | lib/tasks/locales.rake | 4 | ||||
-rw-r--r-- | lib/tasks/migrate_from_trac.rake | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/tasks/email.rake b/lib/tasks/email.rake index 25d7d667b..0b0b2b752 100644 --- a/lib/tasks/email.rake +++ b/lib/tasks/email.rake @@ -164,7 +164,7 @@ END_DESC begin Mailer.deliver_test_email(user) puts l(:notice_email_sent, user.mail) - rescue Exception => e + rescue => e abort l(:notice_email_error, e.message) end end diff --git a/lib/tasks/locales.rake b/lib/tasks/locales.rake index 028a25154..952f8f6de 100644 --- a/lib/tasks/locales.rake +++ b/lib/tasks/locales.rake @@ -168,12 +168,12 @@ END_DESC puts "parsing #{filename}..." begin parser.parse File.open(filename) - rescue Exception => e1 + rescue => e1 puts(e1.message) puts("") end end - rescue Exception => e + rescue => e puts(e.message) end end diff --git a/lib/tasks/migrate_from_trac.rake b/lib/tasks/migrate_from_trac.rake index eb0d81e0a..8bf31c3d3 100644 --- a/lib/tasks/migrate_from_trac.rake +++ b/lib/tasks/migrate_from_trac.rake @@ -614,7 +614,7 @@ namespace :redmine do raise "This directory doesn't exist!" unless File.directory?(path) raise "#{trac_attachments_directory} doesn't exist!" unless File.directory?(trac_attachments_directory) @@trac_directory - rescue Exception => e + rescue => e puts e return false end @@ -629,7 +629,7 @@ namespace :redmine do # If adapter is sqlite or sqlite3, make sure that trac.db exists raise "#{trac_db_path} doesn't exist!" if %w(sqlite3).include?(adapter) && !File.exist?(trac_db_path) @@trac_adapter = adapter - rescue Exception => e + rescue => e puts e return false end |