Exception: MongoScript::Multiquery::QueryFailedError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- MongoScript::Multiquery::QueryFailedError
- Defined in:
- lib/mongoscript/multiquery.rb
Instance Attribute Summary collapse
-
#db_response ⇒ Object
The response from the multiquery Javascript.
-
#query_name ⇒ Object
The name of the original query.
-
#query_parameters ⇒ Object
The original query whose execution failed.
Instance Method Summary collapse
-
#initialize(name, query, response) ⇒ QueryFailedError
constructor
A new instance of QueryFailedError.
Constructor Details
#initialize(name, query, response) ⇒ QueryFailedError
Returns a new instance of QueryFailedError.
12 13 14 15 16 17 18 19 |
# File 'lib/mongoscript/multiquery.rb', line 12 def initialize(name, query, response) @query_name = name @query_parameters = query @db_response = response super("Query #{@query_name} failed with the following response: #{response.inspect}") # set the backtrace to everything that's going on except this initialize method set_backtrace(caller[1...caller.length]) end |
Instance Attribute Details
#db_response ⇒ Object
The response from the multiquery Javascript.
10 11 12 |
# File 'lib/mongoscript/multiquery.rb', line 10 def db_response @db_response end |
#query_name ⇒ Object
The name of the original query
8 9 10 |
# File 'lib/mongoscript/multiquery.rb', line 8 def query_name @query_name end |
#query_parameters ⇒ Object
The original query whose execution failed.
6 7 8 |
# File 'lib/mongoscript/multiquery.rb', line 6 def query_parameters @query_parameters end |