lib/mongo/error/pool_closed_error.rb in mongo-2.18.3 vs lib/mongo/error/pool_closed_error.rb in mongo-2.19.0

- old
+ new

@@ -1,7 +1,7 @@ # frozen_string_literal: true -# encoding: utf-8 +# rubocop:todo all # Copyright (C) 2019-2020 MongoDB Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -19,34 +19,21 @@ class Error # Exception raised if an operation is attempted on a closed connection pool. # # @since 2.9.0 - class PoolClosedError < Error + class PoolClosedError < PoolError - # @return [ Mongo::Address ] address The address of the server the - # pool's connections connect to. - # - # @since 2.9.0 - attr_reader :address - - # @return [ Mongo::Server::ConnectionPool ] pool The pool that is closed. - # - # @since 2.11.0 - # @api experimental - attr_reader :pool - # Instantiate the new exception. # # @example Instantiate the exception. # Mongo::Error::PoolClosedError.new(address, pool) # # @since 2.9.0 # @api private def initialize(address, pool) - @address = address - @pool = pool - super("Attempted to use a connection pool which has been closed (for #{address} " + + super(address, pool, + "Attempted to use a connection pool which has been closed (for #{address} " + "with pool 0x#{pool.object_id})") end end end end