From 9efcad6e577bdc76f7fef5be703648f7f10ca4a9 Mon Sep 17 00:00:00 2001 From: Karel Picman Date: Mon, 16 Dec 2013 15:21:36 +0100 Subject: [PATCH] Particular exceptions replaced with the base class exception --- app/controllers/dmsf_files_controller.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/dmsf_files_controller.rb b/app/controllers/dmsf_files_controller.rb index ad1b0b88..571a1bd0 100644 --- a/app/controllers/dmsf_files_controller.rb +++ b/app/controllers/dmsf_files_controller.rb @@ -116,8 +116,8 @@ class DmsfFilesController < ApplicationController begin @file.unlock! flash[:notice] = "#{l(:notice_file_unlocked)}, " - rescue - #Nothing to do here + rescue Exception => e + logger.error "Cannot unlock the file: #{e.message}" end end @file.save! @@ -127,8 +127,8 @@ class DmsfFilesController < ApplicationController log_activity('new revision') begin DmsfMailer.files_updated(User.current, [@file]).deliver - rescue ActionView::MissingTemplate => e - Rails.logger.error "Could not send email notifications: #{e.message}" + rescue Exception => e + logger.error "Could not send email notifications: #{e.message}" end redirect_to :action => 'show', :id => @file else