Exception: BSON::InvalidKey
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- BSON::InvalidKey
- Defined in:
- lib/bson/object.rb
Overview
Raised when trying to serialize an object into a key.
Instance Method Summary collapse
-
#initialize(object) ⇒ InvalidKey
constructor
Instantiate the exception.
Constructor Details
#initialize(object) ⇒ InvalidKey
Instantiate the exception.
76 77 78 |
# File 'lib/bson/object.rb', line 76 def initialize(object) super("#{object.class} instances are not allowed as keys in a BSON document.") end |