Class: Trackets::Middleware::RackExceptionHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/trackets/middleware/rack_exception_handler.rb

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ RackExceptionHandler

Returns a new instance of RackExceptionHandler.



23
24
25
# File 'lib/trackets/middleware/rack_exception_handler.rb', line 23

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



27
28
29
30
31
32
# File 'lib/trackets/middleware/rack_exception_handler.rb', line 27

def call(env)
  response = @app.call(env)
rescue Exception => exception
  Trackets.notify(exception, env)
  raise
end