Method: NewRelic::Agent::Transaction#notice_error

Defined in:
lib/new_relic/agent/transaction.rb

#notice_error(error, options = {}) ⇒ Object

Do not call this. Invoke the class method instead.

[View source]

781
782
783
784
785
786
787
788
789
790
791
792
793
# File 'lib/new_relic/agent/transaction.rb', line 781

def notice_error(error, options = {}) # :nodoc:
  # Only the last error is kept
  if current_segment
    current_segment.notice_error(error, expected: options[:expected])
    options[:span_id] = current_segment.guid
  end

  if @exceptions[error]
    @exceptions[error].merge!(options)
  else
    @exceptions[error] = options
  end
end