class Mongo::Error::PoolClosedError

Exception raised if an operation is attempted on a closed connection pool.

@since 2.9.0

Attributes

address[R]

@return [ Mongo::Address ] address The address of the server the pool's connections connect to.

@since 2.9.0

pool[R]

@return [ Mongo::Server::ConnectionPool ] pool The pool that is closed.

@since 2.11.0 @api experimental

Public Class Methods

new(address, pool) click to toggle source

Instantiate the new exception.

@example Instantiate the exception.

Mongo::Error::PoolClosedError.new(address, pool)

@since 2.9.0 @api private

Calls superclass method Mongo::Error::new
# File lib/mongo/error/pool_closed_error.rb, line 42
def initialize(address, pool)
  @address = address
  @pool = pool
  super("Attempted to use a connection pool which has been closed (for #{address} " +
      "with pool 0x#{pool.object_id})")
end