class Ditty::Middleware::ErrorCatchall
Attributes
env[R]
Public Class Methods
new(app)
click to toggle source
# File lib/ditty/middleware/error_catchall.rb, line 10 def initialize(app) @app = app end
Public Instance Methods
call(env)
click to toggle source
# File lib/ditty/middleware/error_catchall.rb, line 14 def call(env) @env = env begin @app.call env rescue StandardError => e ::Ditty::Services::Logger.error "Ditty Catchall: #{e.class}" ::Ditty::Services::Logger.error e [500, {}, ['Unknown Error']] end end