Exception: BSON::Error::InvalidKey
- Inherits:
-
BSON::Error
- Object
- StandardError
- BSON::Error
- BSON::Error::InvalidKey
- Defined in:
- lib/bson/error/invalid_key.rb
Overview
Raised when trying to serialize an object into a key.
Instance Method Summary collapse
-
#initialize(object) ⇒ InvalidKey
constructor
private
Instantiate the exception.
Constructor Details
#initialize(object) ⇒ InvalidKey
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/invalid_key.rb', line 18 def initialize(object) super("#{object.class} instances are not allowed as keys in a BSON document.") end |