Class: Sidekiq::Squelch::ErrorHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/sidekiq/squelch/error_handler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(notifier) ⇒ ErrorHandler

Returns a new instance of ErrorHandler.



6
7
8
# File 'lib/sidekiq/squelch/error_handler.rb', line 6

def initialize(notifier)
  @notifier = notifier
end

Instance Attribute Details

#notifierObject

Returns the value of attribute notifier.



4
5
6
# File 'lib/sidekiq/squelch/error_handler.rb', line 4

def notifier
  @notifier
end

Instance Method Details

#call(ex, context) ⇒ Object



10
11
12
13
# File 'lib/sidekiq/squelch/error_handler.rb', line 10

def call(ex, context)
  increment_exception_counter ex
  notifier.notify ex, context unless squelched? ex 
end