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
This commit is contained in:
Go MAEDA
2019-05-25 06:50:25 +00:00
parent a12b7bcf29
commit b0e17e8199
28 changed files with 40 additions and 44 deletions

View File

@@ -54,7 +54,7 @@ class AdminController < ApplicationController
begin
Redmine::DefaultData::Loader::load(params[:lang])
flash[:notice] = l(:notice_default_data_loaded)
rescue Exception => e
rescue => e
flash[:error] = l(:error_can_t_load_default_data, ERB::Util.h(e.message))
end
end
@@ -65,7 +65,7 @@ class AdminController < ApplicationController
begin
Mailer.deliver_test_email(User.current)
flash[:notice] = l(:notice_email_sent, ERB::Util.h(User.current.mail))
rescue Exception => e
rescue => e
flash[:error] = l(:notice_email_error, ERB::Util.h(Redmine::CodesetUtil.replace_invalid_utf8(e.message.dup)))
end
redirect_to settings_path(:tab => 'notifications')