From 3376fd012cd4bb60c94c406ad7a1085140b150ef Mon Sep 17 00:00:00 2001 From: Oleksii Kriuchykhin Date: Thu, 7 Feb 2019 14:00:24 +0100 Subject: [PATCH] Improve error loggin in protocol import [SCI-3023] --- app/controllers/protocols_controller.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/controllers/protocols_controller.rb b/app/controllers/protocols_controller.rb index 54a5abcda..dc9b40eca 100644 --- a/app/controllers/protocols_controller.rb +++ b/app/controllers/protocols_controller.rb @@ -574,8 +574,10 @@ class ProtocolsController < ApplicationController transaction_error = false Protocol.transaction do begin - protocol = import_new_protocol(@protocol_json, @team, @type, current_user) - rescue Exception + protocol = + import_new_protocol(@protocol_json, @team, @type, current_user) + rescue StandardError => ex + Rails.logger.error ex.message transaction_error = true raise ActiveRecord:: Rollback end