Class: Stackify::ErrorsCatcher
- Defined in:
- lib/stackify/rack/errors_catcher.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, &block) ⇒ ErrorsCatcher
constructor
A new instance of ErrorsCatcher.
Constructor Details
#initialize(app, &block) ⇒ ErrorsCatcher
Returns a new instance of ErrorsCatcher.
3 4 5 6 |
# File 'lib/stackify/rack/errors_catcher.rb', line 3 def initialize(app, &block) @app = app @block = block end |
Instance Method Details
#call(env) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/stackify/rack/errors_catcher.rb', line 8 def call(env) @block.call env @app.call env rescue Exception => exception Stackify.logger_client.log_exception(StackifiedError.new exception, binding) raise exception end |