Sha256: cbedad3f60cf1a673933fed006169afb5b9e0cb8fde7a9fba458a349de36bd6d
Contents?: true
Size: 1.16 KB
Versions: 8
Compression:
Stored size: 1.16 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 class RailsExceptionHandler::ActiveRecord end class RailsExceptionHandler::Mongoid 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 'rails_exception_handler/catcher.rb' require 'net/http'
Version data entries
8 entries across 8 versions & 1 rubygems