Method: Mongo::Error::UnexpectedResponse#initialize

Defined in:
lib/mongo/error/unexpected_response.rb

#initialize(expected_response_to, response_to) ⇒ UnexpectedResponse

Create the new exception.

Examples:

Create the new exception.

Mongo::Error::UnexpectedResponse.new(expected_response_to, response_to)

Parameters:

  • expected_response_to (Integer)

    The last request id sent.

  • response_to (Integer)

    The actual response_to of the reply.

Since:

  • 2.2.6



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

def initialize(expected_response_to, response_to)
  super("Unexpected response. Got response for request ID #{response_to} " +
        "but expected response for request ID #{expected_response_to}")
end