Class: TingYun::Agent::Transaction::Exceptions
- Inherits:
-
Object
- Object
- TingYun::Agent::Transaction::Exceptions
- Defined in:
- lib/ting_yun/agent/transaction/exceptions.rb
Instance Attribute Summary collapse
-
#exceptions ⇒ Object
Returns the value of attribute exceptions.
Instance Method Summary collapse
-
#had_error? ⇒ Boolean
collector error.
-
#initialize ⇒ Exceptions
constructor
A new instance of Exceptions.
-
#notice_error(error, options = {}) ⇒ Object
Do not call this.
- #record_exceptions(attributes) ⇒ Object
Constructor Details
#initialize ⇒ Exceptions
Returns a new instance of Exceptions.
9 10 11 |
# File 'lib/ting_yun/agent/transaction/exceptions.rb', line 9 def initialize @exceptions = {} end |
Instance Attribute Details
#exceptions ⇒ Object
Returns the value of attribute exceptions.
7 8 9 |
# File 'lib/ting_yun/agent/transaction/exceptions.rb', line 7 def exceptions @exceptions end |
Instance Method Details
#had_error? ⇒ Boolean
collector error
32 33 34 35 36 37 38 |
# File 'lib/ting_yun/agent/transaction/exceptions.rb', line 32 def had_error? if @exceptions.empty? return false else return true end end |
#notice_error(error, options = {}) ⇒ Object
Do not call this. Invoke the class method instead.
23 24 25 26 27 28 29 |
# File 'lib/ting_yun/agent/transaction/exceptions.rb', line 23 def notice_error(error, ={}) # :nodoc: if @exceptions[error] @exceptions[error].merge! else @exceptions[error] = end end |
#record_exceptions(attributes) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/ting_yun/agent/transaction/exceptions.rb', line 13 def record_exceptions(attributes) unless @exceptions.empty? @exceptions.each do |exception, | [:attributes] = attributes ::TingYun::Agent.instance.error_collector.notice_error(exception, ) end end end |