Class: Sidekiq::Squelch::ErrorHandler
- Inherits:
-
Object
- Object
- Sidekiq::Squelch::ErrorHandler
- Defined in:
- lib/sidekiq/squelch/error_handler.rb
Instance Attribute Summary collapse
-
#notifier ⇒ Object
Returns the value of attribute notifier.
Instance Method Summary collapse
- #call(ex, context) ⇒ Object
-
#initialize(notifier) ⇒ ErrorHandler
constructor
A new instance of ErrorHandler.
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
#notifier ⇒ Object
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 |