当无法建立与数据库的连接时引发(例如当 ActiveRecord::Base.connection= 给定一个 nil
对象时)。
方法
类公共方法
new(message = nil, connection_pool: nil) 链接
源代码:显示 | 在 GitHub 上
# File activerecord/lib/active_record/errors.rb, line 72 def initialize(message = nil, connection_pool: nil) super(message, connection_pool: connection_pool) end
实例公共方法
set_pool(connection_pool) 链接
源代码:显示 | 在 GitHub 上
# File activerecord/lib/active_record/errors.rb, line 76 def set_pool(connection_pool) unless @connection_pool @connection_pool = connection_pool end self end