aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2018-11-28 12:51:39 -0500
committerGitHub <noreply@github.com>2018-11-28 12:51:39 -0500
commit9c6e362a632b15dd4f56534b30144926c29fa323 (patch)
tree94ffd6119df3beb19e022ec2cbced4ba7d309ddf /activerecord
parentaaacfd90da00e480d08c60502a1fe65181c5d75e (diff)
parenta1a08ac7ca4bf6f0565d5b0f2109a854895abe28 (diff)
downloadrails-9c6e362a632b15dd4f56534b30144926c29fa323.tar.gz
rails-9c6e362a632b15dd4f56534b30144926c29fa323.tar.bz2
rails-9c6e362a632b15dd4f56534b30144926c29fa323.zip
Merge pull request #34557 from sergioisidoro/sergio-patch-load-error
Patch load error in case GemSpecError
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/connection_adapters/connection_specification.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/connection_specification.rb b/activerecord/lib/active_record/connection_adapters/connection_specification.rb
index 2e7a78215a..f60d8469cc 100644
--- a/activerecord/lib/active_record/connection_adapters/connection_specification.rb
+++ b/activerecord/lib/active_record/connection_adapters/connection_specification.rb
@@ -174,12 +174,12 @@ module ActiveRecord
if e.path == path_to_adapter
# We can assume that a non-builtin adapter was specified, so it's
# either misspelled or missing from Gemfile.
- raise e.class, "Could not load the '#{spec[:adapter]}' Active Record adapter. Ensure that the adapter is spelled correctly in config/database.yml and that you've added the necessary adapter gem to your Gemfile.", e.backtrace
+ raise LoadError, "Could not load the '#{spec[:adapter]}' Active Record adapter. Ensure that the adapter is spelled correctly in config/database.yml and that you've added the necessary adapter gem to your Gemfile.", e.backtrace
# Bubbled up from the adapter require. Prefix the exception message
# with some guidance about how to address it and reraise.
else
- raise e.class, "Error loading the '#{spec[:adapter]}' Active Record adapter. Missing a gem it depends on? #{e.message}", e.backtrace
+ raise LoadError, "Error loading the '#{spec[:adapter]}' Active Record adapter. Missing a gem it depends on? #{e.message}", e.backtrace
end
end