class Croket::Rails::Middleware
Public Class Methods
new(app)
click to toggle source
# File lib/croket/rails/middleware.rb, line 13 def initialize app @app = app end
Public Instance Methods
call(env)
click to toggle source
# File lib/croket/rails/middleware.rb, line 17 def call env begin response = @app.call env rescue Exception => e notify_croket env, e raise e end if framework_exception = env["action_dispatch.exception"] notify_croket env, framework_exception end #p env["rack.errors"], env["action_dispatch.show_exceptions"], env["action_dispatch.show_detailed_exceptions"] p env.keys.select {|i| i.include? 'exception' or i.include? 'err'} response end
Private Instance Methods
notify_croket(env, e)
click to toggle source
# File lib/croket/rails/middleware.rb, line 34 def notify_croket env, e Croket.notify e, env end