class Mongo::Error::MaxBSONSize

Exception that is raised when trying to serialize a document that exceeds max BSON object 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::MaxBSONSize.new(max)

@since 2.0.0

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