diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 4e44a4885db..d36718044c2 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -59,20 +59,6 @@ class ApplicationController < ActionController::Base use_crawler_layout? ? 'crawler' : 'application' end - rescue_from Exception do |exception| - unless [ActiveRecord::RecordNotFound, - ActionController::RoutingError, - ActionController::UnknownController, - AbstractController::ActionNotFound].include? exception.class - begin - Discourse.handle_request_exception(exception, self, request, current_user) - rescue - # dont care give up - end - end - raise - end - # Some exceptions class RenderEmpty < Exception; end diff --git a/lib/discourse.rb b/lib/discourse.rb index da67b3b5dcd..7955d72459c 100644 --- a/lib/discourse.rb +++ b/lib/discourse.rb @@ -26,29 +26,6 @@ module Discourse }.merge(context)) end - def self.handle_request_exception(ex, controller, request, current_user) - cm = RailsMultisite::ConnectionManagement - context = { - current_db: cm.current_db, - current_hostname: cm.current_hostname, - rails_action: controller.action_name, - rails_controller: controller.controller_name, - } - - env = request.env.dup - - context.each do |key, value| - Logster.add_to_env(env, key, value) - end - - begin - Thread.current[Logster::Logger::LOGSTER_ENV] = env - Logster.logger.fatal("#{ex.class.to_s}: #{ex.message} in #{controller.controller_name}##{controller.action_name}") - ensure - Thread.current[Logster::Logger::LOGSTER_ENV] = nil - end - end - # Expected less matches than what we got in a find class TooManyMatches < Exception; end