class Mongo::Error::UnexpectedResponse
Raised if the response read from the socket does not match the latest query.
@since 2.2.6
Public Class Methods
new(expected_response_to, response_to)
click to toggle source
Create the new exception.
@example Create the new exception.
Mongo::Error::UnexpectedResponse.new(expected_response_to, response_to)
@param [ Integer ] expected_response_to The last request id sent. @param [ Integer ] response_to The actual response_to of the reply.
@since 2.2.6
Calls superclass method
Mongo::Error::new
# File lib/mongo/error/unexpected_response.rb, line 32 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