클래스: Mongo::Error::UnexpectedResponse

상속:
오류
  • 객체
모두 표시
다음에 정의됨:
lib/ Mongo/error/unexpected_response.rb

개요

소켓에서 읽은 응답이 최신 쿼리와 일치하지 않는 경우 발생합니다.

이후:

  • 2.2.6

인스턴스 메서드 요약 접기

생성자 세부 정보

#initialize(expected_response_to, response_to) ⇒ UnexpectedResponse

새 예외를 만듭니다.

예시:

새 예외를 만듭니다.

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

매개변수:

  • expected_response_to (정수)

    마지막으로 전송된 요청 ID입니다.

  • response_to (정수)

    회신의 실제 response_to입니다.

이후:

  • 2.2.6



32
33
34
35
# 파일 'lib/ Mongo/error/unexpected_response.rb', 줄 32

def 초기화(expected_response_to, response_to)
  super("예기치 않은 응답입니다. 요청 ID #{response_to}에 대한 응답을 받았습니다. " +
    "하지만 요청 ID #{expected_response_to}에 대한 예상 응답")
end