Exception: BSON::Error::IllegalKey
- Inherits:
-
BSON::Error
- Object
- StandardError
- BSON::Error
- BSON::Error::IllegalKey
- Defined in:
- lib/bson/error/illegal_key.rb
Overview
Raised when validating keys and a key is illegal in MongoDB
Instance Method Summary collapse
-
#initialize(string) ⇒ IllegalKey
constructor
private
Instantiate the exception.
Constructor Details
#initialize(string) ⇒ IllegalKey
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Instantiate the exception.
18 19 20 |
# 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 |