Class: ExceptionHandler
- Inherits:
-
Object
- Object
- ExceptionHandler
- Defined in:
- lib/exception_handler.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ ExceptionHandler
constructor
A new instance of ExceptionHandler.
Constructor Details
#initialize(app) ⇒ ExceptionHandler
Returns a new instance of ExceptionHandler.
2 3 4 5 |
# File 'lib/exception_handler.rb', line 2 def initialize(app) @app = app @res = Rack::Response.new end |
Instance Method Details
#call(env) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/exception_handler.rb', line 7 def call(env) begin app.call(env) rescue => e puts e end end |