mirror of
https://github.com/redmine/redmine.git
synced 2025-11-05 04:45:57 +01:00
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:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user