Class: RuntimeerrorNotifier::Tracker

Inherits:
Object
  • Object
show all
Defined in:
lib/runtimeerror_notifier/tracker.rb

Instance Method Summary collapse

Constructor Details

#initialize(app, options = {}) ⇒ Tracker

Returns a new instance of Tracker.



3
4
5
# File 'lib/runtimeerror_notifier/tracker.rb', line 3

def initialize(app, options={})
  @app, @options = app, options
end

Instance Method Details

#call(env) ⇒ Object



7
8
9
10
11
12
# File 'lib/runtimeerror_notifier/tracker.rb', line 7

def call(env)
  @app.call(env)
rescue Exception => ex
  RuntimeerrorNotifier::Notifier.notification(env, ex, @options)
  raise ex
end