class Moped::Errors::MongoError

Generic error class for exceptions generated on the remote MongoDB server.

Attributes

command[R]

@attribute [r] details The details about the error. @attribute [r] command The command that generated the error.

details[R]

@attribute [r] details The details about the error. @attribute [r] command The command that generated the error.

Public Class Methods

new(command, details) click to toggle source

Create a new operation failure exception.

@example Create the new error.

MongoError.new(command, details)

@param [ Object ] command The command that generated the error. @param [ Hash ] details The details about the error.

@since 1.0.0

# File lib/moped/errors.rb, line 50
def initialize(command, details)
  @command, @details = command, details
  super(build_message)
end