Method: Mongo::Error::MaxMessageSize#initialize

Defined in:
lib/mongo/error/max_message_size.rb

#initialize(max_size = nil) ⇒ MaxMessageSize

Instantiate the new exception.

Examples:

Instantiate the exception.

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

Parameters:

  • max_size (Integer) (defaults to: nil)

    The maximum message size.

Since:

  • 2.0.0



40
41
42
# File 'lib/mongo/error/max_message_size.rb', line 40

def initialize(max_size = nil)
  super(max_size ?  MESSAGE + " The max is #{max_size}." : MESSAGE)
end