Exception -> StandardError

This commit is contained in:
Karel Pičman 2020-01-14 14:28:41 +01:00
parent 5b295d3a6c
commit 8a5d8ff6ec
3 changed files with 4 additions and 4 deletions

View File

@ -153,8 +153,8 @@ class DmsfFilesController < ApplicationController
revision.assign_workflow(params[:dmsf_workflow_id])
if upload
begin
FileUtils.mv(upload.tempfile_path, revision.disk_file(false))
rescue StandardError => e
FileUtils.mv upload.tempfile_path, revision.disk_file(false)
rescue => e
Rails.logger.error e.message
flash[:error] = e.message
revision.destroy

View File

@ -208,7 +208,7 @@ class DmsfWorkflowsController < ApplicationController
end
end
end
rescue StandardError => e
rescue => e
flash[:errors] = e.message
end
redirect_to :back

View File

@ -174,7 +174,7 @@ class DmsfFileRevision < ActiveRecord::Base
path = storage_base_path
begin
FileUtils.mkdir_p(path) unless File.exist?(path)
rescue StandardError => e
rescue => e
Rails.logger.error e.message
end
filename = path.join(disk_filename)