Class: Ezlog::Rails::LogExceptions
- Inherits:
-
Object
- Object
- Ezlog::Rails::LogExceptions
- Defined in:
- lib/ezlog/rails/log_exceptions.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, logger) ⇒ LogExceptions
constructor
A new instance of LogExceptions.
Constructor Details
#initialize(app, logger) ⇒ LogExceptions
Returns a new instance of LogExceptions.
4 5 6 7 |
# File 'lib/ezlog/rails/log_exceptions.rb', line 4 def initialize(app, logger) @app = app @logger = logger end |
Instance Method Details
#call(env) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/ezlog/rails/log_exceptions.rb', line 9 def call(env) @app.call(env) rescue Exception => exception @logger.error exception unless handled?(exception) raise end |