Class: Trackets::Middleware::RackExceptionHandler
- Inherits:
-
Object
- Object
- Trackets::Middleware::RackExceptionHandler
- Defined in:
- lib/trackets/middleware/rack_exception_handler.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ RackExceptionHandler
constructor
A new instance of RackExceptionHandler.
Constructor Details
#initialize(app) ⇒ RackExceptionHandler
Returns a new instance of RackExceptionHandler.
5 6 7 |
# File 'lib/trackets/middleware/rack_exception_handler.rb', line 5 def initialize(app) @app = app end |
Instance Method Details
#call(env) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/trackets/middleware/rack_exception_handler.rb', line 9 def call(env) response = @app.call(env) rescue RuntimeError => exception Trackets.notify(exception, env) raise exception end |