class Mongo::Error::MaxMessageSize

Exception that is raised when trying to send a message that exceeds max message size.

@since 2.0.0

Constants

MESSAGE

The message is constant.

@since 2.0.0

Public Class Methods

new(max_size = nil) click to toggle source

Instantiate the new exception.

@example Instantiate the exception.

Mongo::Error::MaxMessageSize.new(max)

@param [ Integer ] max_size The maximum message size.

@since 2.0.0

Calls superclass method Mongo::Error::new
# File lib/mongo/error/max_message_size.rb, line 37
def initialize(max_size = nil)
  super(max_size ?  MESSAGE + " The max is #{max_size}." : MESSAGE)
end