Class: RailsInformant::Middleware::RescuedExceptionInterceptor

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_informant/middleware/rescued_exception_interceptor.rb

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ RescuedExceptionInterceptor

Returns a new instance of RescuedExceptionInterceptor.



4
5
6
# File 'lib/rails_informant/middleware/rescued_exception_interceptor.rb', line 4

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



8
9
10
11
12
13
# File 'lib/rails_informant/middleware/rescued_exception_interceptor.rb', line 8

def call(env)
  @app.call(env)
rescue StandardError => exception
  env["rails_informant.rescued_exception"] = exception
  raise
end