Sha256: 045813a5f48043e942d9d9a1d5c8564e4b28cf2c888676bf475267c155394590
Contents?: true
Size: 1.03 KB
Versions: 1
Compression:
Stored size: 1.03 KB
Contents
class RailsExceptionHandler def initialize(app) @app = app end def call(env) @app.call(env) rescue Exception => e Handler.new(env, e).handle_exception end def self.configuration @configuration ||= Configuration.new end def self.configure yield configuration return unless configuration.activate? unless Rails.configuration.middleware.class == ActionDispatch::MiddlewareStack && Rails.configuration.middleware.include?(RailsExceptionHandler) Rails.configuration.middleware.use(RailsExceptionHandler) end Rails.configuration.action_dispatch.show_exceptions = true Rails.configuration.consider_all_requests_local = false require File.expand_path(File.dirname(__FILE__)) + '/patch/show_exceptions.rb' configuration.run_callback end end require 'rails_exception_handler/configuration.rb' require 'rails_exception_handler/handler.rb' require 'rails_exception_handler/parser.rb' require 'rails_exception_handler/storage.rb' require 'rails_exception_handler/engine.rb' require 'net/http'
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rails_exception_handler-2.2.0 | lib/rails_exception_handler.rb |