Method: Moped::Errors::MongoError#initialize

Defined in:
lib/moped/errors.rb

#initialize(command, details) ⇒ MongoError

Create a new operation failure exception.

Examples:

Create the new error.

MongoError.new(command, details)

Parameters:

  • command (Object)

    The command that generated the error.

  • details (Hash)

    The details about the error.

Since:

  • 1.0.0



50
51
52
53
# File 'lib/moped/errors.rb', line 50

def initialize(command, details)
  @command, @details = command, details
  super(build_message)
end