lib/mongo/operation/result.rb
def error
        @error ||= Error::OperationFailure.new(
          parser.message,
          self,
          code: parser.code,
          code_name: parser.code_name,
          write_concern_error_document: parser.write_concern_error_document,
          write_concern_error_code: parser.write_concern_error_code,
          write_concern_error_code_name: parser.write_concern_error_code_name,
          write_concern_error_labels: parser.write_concern_error_labels,
          labels: parser.labels,
          wtimeout: parser.wtimeout,
          connection_description: connection_description,
          document: parser.document,
          server_message: parser.server_message,
        )
      end
# The exception instance (of the Error::OperationFailure class)
# that would be raised during processing of this result.
#
# This method should only be called when result is not successful.
#
# @return [ Error::OperationFailure ] The exception.
#
# @api private
The exception instance (of the Error::OperationFailure class)
that would be raised during processing of this result.

This method should only be called when result is not successful.
The exception instance ( of the Error :: OperationFailure class ) that would be raised during processing of this result . This method should only be called when result is not successful .
def error
        @error ||= Error::OperationFailure.new(
          parser.message,
          self,
          code: parser.code,
          code_name: parser.code_name,
          write_concern_error_document: parser.write_concern_error_document,
          write_concern_error_code: parser.write_concern_error_code,
          write_concern_error_code_name: parser.write_concern_error_code_name,
          write_concern_error_labels: parser.write_concern_error_labels,
          labels: parser.labels,
          wtimeout: parser.wtimeout,
          connection_description: connection_description,
          document: parser.document,
          server_message: parser.server_message,
        )
      end
def error @error ||= Error :: OperationFailure . new ( parser . message , self , code : parser . code , code_name : parser . code_name , write_concern_error_document : parser . write_concern_error_document , write_concern_error_code : parser . write_concern_error_code , write_concern_error_code_name : parser . write_concern_error_code_name , write_concern_error_labels : parser . write_concern_error_labels , labels : parser . labels , wtimeout : parser . wtimeout , connection_description : connection_description , document : parser . document , server_message : parser . server_message , ) end
The exception instance (of the Error::OperationFailure class)
that would be raised during processing of this result.
The exception instance ( of the Error :: OperationFailure class ) that would be raised during processing of this result .
None
 Error::OperationFailure 
api
None