Class: Cql::QueryError

Inherits:
CqlError
  • Object
show all
Includes:
ErrorCodes
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.

Constant Summary

Constants included from ErrorCodes

ErrorCodes::ALREADY_EXISTS, ErrorCodes::BAD_CREDENTIALS, ErrorCodes::CONFIG_ERROR, ErrorCodes::INVALID, ErrorCodes::IS_BOOTSTRAPPING, ErrorCodes::OVERLOADED, ErrorCodes::PROTOCOL_ERROR, ErrorCodes::READ_TIMEOUT, ErrorCodes::SERVER_ERROR, ErrorCodes::SYNTAX_ERROR, ErrorCodes::TRUNCATE_ERROR, ErrorCodes::UNAUTHORIZED, ErrorCodes::UNAVAILABLE, ErrorCodes::UNPREPARED, ErrorCodes::WRITE_TIMEOUT

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of QueryError.



13
14
15
16
17
18
# File 'lib/cql/client.rb', line 13

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

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



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

def code
  @code
end

#cqlObject (readonly)

Returns the value of attribute cql.



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

def cql
  @cql
end

#detailsObject (readonly)

Returns the value of attribute details.



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

def details
  @details
end