Exception: Mongo::Error::UnknownPayloadType

Inherits:
Mongo::Error
  • Object
show all
Defined in:
build/ruby-driver-v2.19/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 Attribute Summary

Attributes included from Notable

#connection_global_id, #generation, #service_id

Instance Method Summary collapse

Methods inherited from Mongo::Error

#change_stream_resumable?, #write_concern_error_label?, #write_concern_error_labels

Methods included from ChangeStreamResumable

#change_stream_resumable?

Methods included from WriteRetryable

#write_retryable?

Methods included from Labelable

#add_label, #label?, #labels

Methods included from Notable

#add_note, #add_notes, #notes, #to_s

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



39
40
41
# File 'build/ruby-driver-v2.19/lib/mongo/error/unknown_payload_type.rb', line 39

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