Module: Bugwatch::ReportedExceptions
- Defined in:
- lib/bugwatch/reported_exceptions.rb
Constant Summary collapse
- THREAD_KEY =
:bugwatch_reported_exceptions
Class Method Summary collapse
Class Method Details
.clear ⇒ Object
15 16 17 |
# File 'lib/bugwatch/reported_exceptions.rb', line 15 def self.clear Thread.current[THREAD_KEY] = nil end |
.mark(exception) ⇒ Object
5 6 7 8 |
# File 'lib/bugwatch/reported_exceptions.rb', line 5 def self.mark(exception) return unless exception (Thread.current[THREAD_KEY] ||= []) << exception.object_id end |
.reported?(exception) ⇒ Boolean
10 11 12 13 |
# File 'lib/bugwatch/reported_exceptions.rb', line 10 def self.reported?(exception) return false unless exception (Thread.current[THREAD_KEY] || []).include?(exception.object_id) end |