Class: Mongo::Error::PoolError

Inherits:
Error
  • Object
show all
Defined in:
lib/mongo/error/pool_error.rb

Overview

Abstract base class for connection pool-related exceptions.

Since:

  • 2.0.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(address, pool, message) ⇒ PoolError

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Instantiate the new exception.

Since:

  • 2.0.0



35
36
37
38
39
# File 'lib/mongo/error/pool_error.rb', line 35

def initialize(address, pool, message)
  @address = address
  @pool = pool
  super(message)
end

Instance Attribute Details

#addressMongo::Address (readonly)

pool's connections connect to.

Returns:

Since:

  • 2.9.0



25
26
27
# File 'lib/mongo/error/pool_error.rb', line 25

def address
  @address
end

#poolMongo::Server::ConnectionPool (readonly)

Returns pool The connection pool.

Returns:

Since:

  • 2.11.0



30
31
32
# File 'lib/mongo/error/pool_error.rb', line 30

def pool
  @pool
end