Sha256: 279cd8701b65f03382db908758a06918b4593ad27b838c80bfb8fb5a9aca5b49

Contents?: true

Size: 558 Bytes

Versions: 6

Compression:

Stored size: 558 Bytes

Contents

# frozen_string_literal: true
# rubocop:todo all

module BSON
  class Error

    # Raised when validating keys and a key is illegal in MongoDB
    class IllegalKey < Error

      # Instantiate the exception.
      #
      # @example Instantiate the exception.
      #   BSON::Error::IllegalKey.new(string)
      #
      # @param [ String ] string The illegal string.
      #
      # @api private
      def initialize(string)
        super("'#{string}' is an illegal key in MongoDB. Keys may not start with '$' or contain a '.'.")
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
bson-5.0.2 lib/bson/error/illegal_key.rb
bson-5.0.2-java lib/bson/error/illegal_key.rb
bson-5.0.1 lib/bson/error/illegal_key.rb
bson-5.0.1-java lib/bson/error/illegal_key.rb
bson-5.0.0-java lib/bson/error/illegal_key.rb
bson-5.0.0 lib/bson/error/illegal_key.rb