From 27c569fec885121d455c8bff168e6db588e4db74 Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Sun, 23 Feb 2020 12:58:43 +0100 Subject: [PATCH] handle exception without message. #430 --- app/models/concerns/crosscitable.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/concerns/crosscitable.rb b/app/models/concerns/crosscitable.rb index 450531d65..b7d0474c8 100644 --- a/app/models/concerns/crosscitable.rb +++ b/app/models/concerns/crosscitable.rb @@ -48,11 +48,11 @@ def parse_xml(input, options={}) meta = from.present? ? send("read_" + from, { string: input, doi: options[:doi], sandbox: sandbox }).compact : {} meta.merge("string" => input, "from" => from) - rescue NoMethodError, ArgumentError => exception - Raven.capture_exception(exception) + rescue NoMethodError, ArgumentError => e + Raven.capture_exception(e) - Rails.logger.error "Error " + exception.message + " for doi " + @doi + "." - Rails.logger.error exception + Rails.logger.error "Error " + e.message + " for doi " + @doi + "." if e.message.present? + Rails.logger.error exception.inspect {} end