Exception: Mongo::MongoDBError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/mongo/exceptions.rb

Overview

Raised when MongoDB itself has returned an error.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, error_code = nil, result = nil) ⇒ MongoDBError



28
29
30
31
32
# File 'lib/mongo/exceptions.rb', line 28

def initialize(message=nil, error_code=nil, result=nil)
  @error_code = error_code
  @result = result
  super(message)
end

Instance Attribute Details

#error_codeObject (readonly)



26
27
28
# File 'lib/mongo/exceptions.rb', line 26

def error_code
  @error_code
end

#resultObject (readonly)



23
24
25
# File 'lib/mongo/exceptions.rb', line 23

def result
  @result
end