Exception: ActiveRecord::ConnectionNotEstablished
- Inherits:
-
AdapterError
- Object
- StandardError
- ActiveRecordError
- AdapterError
- ActiveRecord::ConnectionNotEstablished
- Defined in:
- lib/active_record/errors.rb
Overview
Raised when connection to the database could not been established (for example when ActiveRecord::Base.lease_connection= is given a nil
object).
Direct Known Subclasses
ConnectionNotDefined, ConnectionTimeoutError, DatabaseConnectionError
Instance Attribute Summary
Attributes inherited from AdapterError
Instance Method Summary collapse
-
#initialize(message = nil, connection_pool: nil) ⇒ ConnectionNotEstablished
constructor
A new instance of ConnectionNotEstablished.
- #set_pool(connection_pool) ⇒ Object
Constructor Details
#initialize(message = nil, connection_pool: nil) ⇒ ConnectionNotEstablished
Returns a new instance of ConnectionNotEstablished.
68 69 70 |
# File 'lib/active_record/errors.rb', line 68 def initialize( = nil, connection_pool: nil) super(, connection_pool: connection_pool) end |
Instance Method Details
#set_pool(connection_pool) ⇒ Object
72 73 74 75 76 77 78 |
# File 'lib/active_record/errors.rb', line 72 def set_pool(connection_pool) unless @connection_pool @connection_pool = connection_pool end self end |