Commit e05faa85 authored by Vladimir Shushlin's avatar Vladimir Shushlin

Properly report DiskAccessDenied exception

It you do Error.new the stack trace is not being attached,
so we need to explicitly raise it
parent c23a3fa8
......@@ -6,7 +6,7 @@ module Gitlab
DiskAccessDenied = Class.new(StandardError)
def path
::Gitlab::ErrorTracking.track_exception(DiskAccessDenied.new) if disk_access_denied?
report_denied_disk_access
super
end
......@@ -22,6 +22,12 @@ module Gitlab
::Gitlab::Runtime.web_server? && !::Gitlab::Runtime.test_suite?
end
def report_denied_disk_access
raise DiskAccessDenied if disk_access_denied?
rescue => e
::Gitlab::ErrorTracking.track_exception(e)
end
end
end
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