Method: Mongo::Operation::MapReduce::Result#validate!

Defined in:
lib/mongo/operation/map_reduce/result.rb

#validate!Result

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.

Note:

This only checks for errors with writes since authentication is handled at the connection level and any authentication errors would be raised there, before a Result is ever created.

Validate the result by checking for any errors.

Examples:

Validate the result.

result.validate!

Returns:

  • (Result)

    The result if verification passed.

Raises:

Since:

  • 2.0.0



117
118
119
# File 'lib/mongo/operation/map_reduce/result.rb', line 117

def validate!
  documents.nil? ? raise_operation_failure : self
end