class TingYun::Agent::Transaction::Exceptions
Attributes
exceptions[RW]
Public Class Methods
new()
click to toggle source
# File lib/ting_yun/agent/transaction/exceptions.rb, line 10 def initialize @exceptions = {} end
Public Instance Methods
count_errors()
click to toggle source
# File lib/ting_yun/agent/transaction/exceptions.rb, line 41 def count_errors @count_errors ||= errors.size end
errors()
click to toggle source
# File lib/ting_yun/agent/transaction/exceptions.rb, line 45 def errors @errors ||= exceptions.select{|k,v| v[:type]==:error} end
errors_and_exceptions()
click to toggle source
# File lib/ting_yun/agent/transaction/exceptions.rb, line 37 def errors_and_exceptions [count_errors, exceptions.size - count_errors] end
had_error?()
click to toggle source
collector error
# File lib/ting_yun/agent/transaction/exceptions.rb, line 33 def had_error? @have ||= count_errors == 0? false : true end
record_exceptions(attributes)
click to toggle source
# File lib/ting_yun/agent/transaction/exceptions.rb, line 14 def record_exceptions(attributes) unless @exceptions.empty? @exceptions.each do |exception, options| options[:attributes] = attributes ::TingYun::Agent.instance.error_collector.notice_error(exception, options) end end end