Class Mongo::Error::Parser
In: lib/mongo/error/parser.rb
Parent: Object

Class for parsing the various forms that errors can come in from MongoDB command responses.

@since 2.0.0

Methods

new  

Included Modules

SdamErrorDetection

Attributes

code  [R]  @return [ Integer ] code The error code parsed from the document. @since 2.6.0
code_name  [R]  @return [ String ] code_name The error code name parsed from the document. @since 2.6.0
document  [R]  @return [ BSON::Document ] document The returned document.
labels  [R]  @return [ Array<String> ] labels The set of labels associated with the error. @since 2.7.0
message  [R]  @return [ String ] message The error message parsed from the document.
replies  [R]  @return [ Array<Protocol::Message> ] replies The message replies.
wtimeout  [R]  @api private

Public Class methods

Create the new parser with the returned document.

@example Create the new parser.

  Parser.new({ 'errmsg' => 'failed' })

@param [ BSON::Document ] document The returned document.

@since 2.0.0

[Validate]