Exception: Mongo::Error::UnknownPayloadType

Inherits:
Mongo::Error
  • Object
show all
Defined in:
lib/mongo/error/unknown_payload_type.rb

Overview

Raised if an unknown payload type is encountered when an OP_MSG is created or read.

Since:

  • 2.5.0

Constant Summary collapse

MESSAGE =

The error message.

Since:

  • 2.5.0

'Unknown payload type (%s) encountered when creating or reading an OP_MSG wire protocol message.'

Constants inherited from Mongo::Error

BAD_VALUE, CODE, CURSOR_NOT_FOUND, ERR, ERRMSG, ERROR, TRANSIENT_TRANSACTION_ERROR_LABEL, UNKNOWN_ERROR, UNKNOWN_TRANSACTION_COMMIT_RESULT_LABEL, WRITE_CONCERN_ERROR, WRITE_CONCERN_ERRORS, WRITE_ERRORS

Instance Method Summary collapse

Methods inherited from Mongo::Error

#change_stream_resumable?, #label?, #labels

Constructor Details

#initialize(byte) ⇒ UnknownPayloadType

Create the new exception.

Examples:

Create the new exception.

Mongo::Error::UnknownPayloadType.new(byte)

Parameters:

  • byte (String)

    The unknown payload type.

Since:

  • 2.5.0



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

def initialize(byte)
  super(MESSAGE % byte.inspect)
end