Class: Bugwatch::RescuedExceptionTracker

Inherits:
Object
  • Object
show all
Defined in:
lib/bugwatch/rescued_exception_tracker.rb

Constant Summary collapse

THREAD_KEY =
:bugwatch_rescued_exceptions

Class Method Summary collapse

Class Method Details

.clearObject



29
30
31
# File 'lib/bugwatch/rescued_exception_tracker.rb', line 29

def self.clear
  Thread.current[THREAD_KEY] = nil
end

.collectedObject



25
26
27
# File 'lib/bugwatch/rescued_exception_tracker.rb', line 25

def self.collected
  Thread.current[THREAD_KEY] || []
end

.disable!Object



17
18
19
# File 'lib/bugwatch/rescued_exception_tracker.rb', line 17

def self.disable!
  @tracepoint.disable if @tracepoint.enabled?
end

.enable!Object



13
14
15
# File 'lib/bugwatch/rescued_exception_tracker.rb', line 13

def self.enable!
  @tracepoint.enable unless @tracepoint.enabled?
end

.start_requestObject



21
22
23
# File 'lib/bugwatch/rescued_exception_tracker.rb', line 21

def self.start_request
  Thread.current[THREAD_KEY] = []
end