Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
7f5e9645
Commit
7f5e9645
authored
Feb 08, 2021
by
Quang-Minh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set application context before handle controller exceptions
parent
6e0b367c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
app/controllers/application_controller.rb
app/controllers/application_controller.rb
+6
-1
No files found.
app/controllers/application_controller.rb
View file @
7f5e9645
...
...
@@ -170,7 +170,12 @@ class ApplicationController < ActionController::Base
end
def
log_exception
(
exception
)
Gitlab
::
ErrorTracking
.
track_exception
(
exception
)
# At this point, the controller already exits set_current_context around
# block. To maintain the context while handling error exception, we need to
# set the context again
set_current_context
do
Gitlab
::
ErrorTracking
.
track_exception
(
exception
)
end
backtrace_cleaner
=
request
.
env
[
"action_dispatch.backtrace_cleaner"
]
application_trace
=
ActionDispatch
::
ExceptionWrapper
.
new
(
backtrace_cleaner
,
exception
).
application_trace
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment