Class: Cql::QueryError

Inherits:
CqlError
  • Object
show all
Defined in:
lib/cql/client.rb

Overview

This error type represents errors sent by the server, the ‘code` attribute can be used to find the exact type, and `cql` contains the request’s CQL, if any. ‘message` contains the human readable error message sent by the server.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, message, cql = nil) ⇒ QueryError

Returns a new instance of QueryError.



11
12
13
14
15
# File 'lib/cql/client.rb', line 11

def initialize(code, message, cql=nil)
  super(message)
  @code = code
  @cql = cql
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



9
10
11
# File 'lib/cql/client.rb', line 9

def code
  @code
end

#cqlObject (readonly)

Returns the value of attribute cql.



9
10
11
# File 'lib/cql/client.rb', line 9

def cql
  @cql
end