Class: Bugstack::Integrations::RackMiddleware
- Inherits:
-
Object
- Object
- Bugstack::Integrations::RackMiddleware
- Defined in:
- lib/bugstack/integrations/rails.rb
Overview
Rack middleware that captures unhandled exceptions.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ RackMiddleware
constructor
A new instance of RackMiddleware.
Constructor Details
#initialize(app) ⇒ RackMiddleware
Returns a new instance of RackMiddleware.
26 27 28 |
# File 'lib/bugstack/integrations/rails.rb', line 26 def initialize(app) @app = app end |
Instance Method Details
#call(env) ⇒ Object
30 31 32 33 34 35 |
# File 'lib/bugstack/integrations/rails.rb', line 30 def call(env) @app.call(env) rescue Exception => e # rubocop:disable Lint/RescueException capture_from_rack(e, env) raise end |