Class: Mongo::Error::UnknownPayloadType

Inherits:
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.'

Instance Method Summary collapse

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