Class: Mongo::Error::InvalidReplacementDocument
| Relationships & Source Files | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
Error
|
|
|
Instance Chain:
self,
Error
|
|
| Inherits: |
Error
|
| Defined in: | lib/mongo/error/invalid_replacement_document.rb |
Overview
Exception raised if the object is not a valid replacement document.
Constant Summary
-
MESSAGE =
# File 'lib/mongo/error/invalid_replacement_document.rb', line 24Deprecated.
The error message.
'Invalid replacement document provided'
Class Method Summary
-
.message(key) ⇒ String
Internal use only
Internal use only
Construct the error message.
-
.new(key: nil) ⇒ InvalidReplacementDocument
constructor
Instantiate the new exception.
-
.warn(logger, key)
Internal use only
Internal use only
Send and cache the warning.
Constructor Details
.new(key: nil) ⇒ InvalidReplacementDocument
Instantiate the new exception.
# File 'lib/mongo/error/invalid_replacement_document.rb', line 52
def initialize(key: nil) super(self.class.(key)) end
Class Method Details
.message(key) ⇒ String
This method is for internal use only.
Construct the error message.
# File 'lib/mongo/error/invalid_replacement_document.rb', line 33
def self.(key) = 'Invalid replacement document provided. Replacement documents ' += "must not contain atomic modifiers. The \"#{key}\" key is invalid." end
.warn(logger, key)
This method is for internal use only.
Send and cache the warning.
# File 'lib/mongo/error/invalid_replacement_document.rb', line 42
def self.warn(logger, key) @warned ||= begin logger.warn((key)) true end end