Commit 023a3816 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'blackst0ne-rails5-update-application-controller-log-exception' into 'master'

[Rails5] Update `ApplicationController#log_exception` to fix `undefined method 'clean'` error

See merge request gitlab-org/gitlab-ce!18636
parents 9ba9c3c8 991db50f
......@@ -110,7 +110,8 @@ class ApplicationController < ActionController::Base
def log_exception(exception)
Raven.capture_exception(exception) if sentry_enabled?
application_trace = ActionDispatch::ExceptionWrapper.new(env, exception).application_trace
backtrace_cleaner = Gitlab.rails5? ? env["action_dispatch.backtrace_cleaner"] : env
application_trace = ActionDispatch::ExceptionWrapper.new(backtrace_cleaner, exception).application_trace
application_trace.map! { |t| " #{t}\n" }
logger.error "\n#{exception.class.name} (#{exception.message}):\n#{application_trace.join}"
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment