class BSON::Error::IllegalKey

Raised when validating keys and a key is illegal in MongoDB

Public Class Methods

new(string) click to toggle source

Instantiate the exception.

@example Instantiate the exception.

BSON::Error::IllegalKey.new(string)

@param [ String ] string The illegal string.

@api private

Calls superclass method
# File lib/bson/error/illegal_key.rb, line 18
def initialize(string)
  super("'#{string}' is an illegal key in MongoDB. Keys may not start with '$' or contain a '.'.")
end