Class: Benoit::CustomExceptionHandler
- Inherits:
-
Object
- Object
- Benoit::CustomExceptionHandler
- Defined in:
- lib/benoit/server.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ CustomExceptionHandler
constructor
A new instance of CustomExceptionHandler.
Constructor Details
#initialize(app) ⇒ CustomExceptionHandler
Returns a new instance of CustomExceptionHandler.
33 34 35 |
# File 'lib/benoit/server.rb', line 33 def initialize(app) @app = app end |
Instance Method Details
#call(env) ⇒ Object
37 38 39 40 41 42 43 44 |
# File 'lib/benoit/server.rb', line 37 def call(env) @app.call(env) rescue StandardError => ex Benoit::Cleaner.run Logger.error "#{ex.message} (#{ex.class.name})" Logger.error ex.backtrace.join("\n") raise ex end |