lib/mongo/operation/shared/response_handling.rb
# Yields to the block and, if the block raises an exception, adds a note
# to the exception with the address of the specified server.
#
# This method is intended to add server address information to exceptions
# raised during execution of operations on servers.
Yields to the block and, if the block raises an exception, adds a note
to the exception with the address of the specified server.

This method is intended to add server address information to exceptions
raised during execution of operations on servers.
Yields to the block and if the block raises an exception adds a note to the exception with the address of the specified server . This method is intended to add server address information to exceptions raised during execution of operations on servers .
def add_server_diagnostics(connection)
        yield
      rescue Error::SocketError, Error::SocketTimeoutError
        raise
      rescue Error, Error::AuthError => e
        e.add_note("on #{connection.address.seed}")
        e.generation = connection.generation
        e.service_id = connection.service_id
        raise e
      end
def add_server_diagnostics ( connection ) yield rescue Error :: SocketError , Error :: SocketTimeoutError raise rescue Error , Error :: AuthError => e e . add_note ( "on #{connection.address.seed}" ) e . generation = connection . generation e . service_id = connection . service_id raise e end
Yields to the block and, if the block raises an exception, adds a note
to the exception with the address of the specified server.
Yields to the block and if the block raises an exception adds a note to the exception with the address of the specified server .
# Diagnostics should have already been added by the connection code, # do not add them again.
connection
<not_specific>