Skip to content

Commit

Permalink
handle exception without message. #430
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Feb 23, 2020
1 parent b0491bb commit 27c569f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/models/concerns/crosscitable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 27c569f

Please sign in to comment.