Class: Cql::QueryError
- 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
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#cql ⇒ Object
readonly
Returns the value of attribute cql.
-
#details ⇒ Object
readonly
Returns the value of attribute details.
Instance Method Summary collapse
-
#initialize(code, message, cql = nil, details = nil) ⇒ QueryError
constructor
A new instance of QueryError.
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, , cql=nil, details=nil) super() @code = code @cql = cql @details = details end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
11 12 13 |
# File 'lib/cql/client.rb', line 11 def code @code end |
#cql ⇒ Object (readonly)
Returns the value of attribute cql.
11 12 13 |
# File 'lib/cql/client.rb', line 11 def cql @cql end |
#details ⇒ Object (readonly)
Returns the value of attribute details.
11 12 13 |
# File 'lib/cql/client.rb', line 11 def details @details end |