Exception: Moped::Errors::MongoError
- Defined in:
- lib/moped/errors.rb
Overview
Generic error class for exceptions generated on the remote MongoDB server.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
- #command The command that generated the error.(Thecommandthatgeneratedtheerror.) ⇒ Object readonly
-
#details ⇒ Object
readonly
Returns the value of attribute details.
- #details The details about the error.(Thedetailsabouttheerror.) ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(command, details) ⇒ MongoError
constructor
Create a new operation failure exception.
Constructor Details
#initialize(command, details) ⇒ MongoError
Create a new operation failure exception.
44 45 46 47 |
# File 'lib/moped/errors.rb', line 44 def initialize(command, details) @command, @details = command, details super() end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
33 34 35 |
# File 'lib/moped/errors.rb', line 33 def command @command end |
#command The command that generated the error.(Thecommandthatgeneratedtheerror.) ⇒ Object (readonly)
33 |
# File 'lib/moped/errors.rb', line 33 attr_reader :details, :command |
#details ⇒ Object (readonly)
Returns the value of attribute details.
33 34 35 |
# File 'lib/moped/errors.rb', line 33 def details @details end |
#details The details about the error.(Thedetailsabouttheerror.) ⇒ Object (readonly)
33 |
# File 'lib/moped/errors.rb', line 33 attr_reader :details, :command |