Skip to content

Commit 3c1ab14

Browse files
authored
Merge pull request rails#54719 from Austio/explicit-abstract-adapter-not-implemented-errors
Add more explicit NotImplementedErrors in AbstractAdapter
2 parents 7ffc6a7 + fa41e5f commit 3c1ab14

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

activerecord/lib/active_record/connection_adapters/abstract_adapter.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def self.find_cmd_and_exec(commands, *args) # :doc:
119119

120120
# Opens a database console session.
121121
def self.dbconsole(config, options = {})
122-
raise NotImplementedError
122+
raise NotImplementedError.new("#{self.class} should define `dbconsole` that accepts a db config and options to implement connecting to the db console")
123123
end
124124

125125
def initialize(config_or_deprecated_connection, deprecated_logger = nil, deprecated_connection_options = nil, deprecated_config = nil) # :nodoc:
@@ -1092,7 +1092,7 @@ def backoff(counter)
10921092
end
10931093

10941094
def reconnect
1095-
raise NotImplementedError
1095+
raise NotImplementedError.new("#{self.class} should define `reconnect` to implement adapter-specific logic for reconnecting to the database")
10961096
end
10971097

10981098
# Returns a raw connection for internal use with methods that are known

0 commit comments

Comments
 (0)