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
a6c3df47
Commit
a6c3df47
authored
Jan 12, 2019
by
Jasper Maes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix deprecation: #original_exception is deprecated. Use #cause instead.
parent
22d4a103
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
ee/changelogs/unreleased/deprecated-original-exception.yml
ee/changelogs/unreleased/deprecated-original-exception.yml
+5
-0
ee/lib/gitlab/database/load_balancing/load_balancer.rb
ee/lib/gitlab/database/load_balancing/load_balancer.rb
+3
-3
No files found.
ee/changelogs/unreleased/deprecated-original-exception.yml
0 → 100644
View file @
a6c3df47
---
title
:
'
Fix
deprecation:
#original_exception
is
deprecated.
Use
#cause
instead.'
merge_request
:
9141
author
:
Jasper Maes
type
:
other
ee/lib/gitlab/database/load_balancing/load_balancer.rb
View file @
a6c3df47
...
...
@@ -138,7 +138,7 @@ module Gitlab
when
ActiveRecord
::
StatementInvalid
,
ActionView
::
Template
::
Error
# After connecting to the DB Rails will wrap query errors using this
# class.
connection_error?
(
error
.
original_exception
)
connection_error?
(
error
.
cause
)
when
*
CONNECTION_ERRORS
true
else
...
...
@@ -151,8 +151,8 @@ module Gitlab
end
def
serialization_failure?
(
error
)
if
error
.
respond_to?
(
:original_exception
)
serialization_failure?
(
error
.
original_exception
)
if
error
.
cause
serialization_failure?
(
error
.
cause
)
else
error
.
is_a?
(
PG
::
TRSerializationFailure
)
end
...
...
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