Exception: Tarantool::ServerError
- Defined in:
- tarantool-client/lib/tarantool/client/errors.rb
Overview
Error returned by the server for a request.
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#error_stack ⇒ Object
readonly
Returns the value of attribute error_stack.
-
#schema_version ⇒ Object
readonly
Returns the value of attribute schema_version.
Attributes inherited from Error
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(message, code:, error_stack: [], schema_version: nil) ⇒ ServerError
constructor
A new instance of ServerError.
Constructor Details
#initialize(message, code:, error_stack: [], schema_version: nil) ⇒ ServerError
Returns a new instance of ServerError.
56 57 58 59 60 61 |
# File 'tarantool-client/lib/tarantool/client/errors.rb', line 56 def initialize(, code:, error_stack: [], schema_version: nil) super() @code = code @error_stack = error_stack @schema_version = schema_version end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
47 48 49 |
# File 'tarantool-client/lib/tarantool/client/errors.rb', line 47 def code @code end |
#error_stack ⇒ Object (readonly)
Returns the value of attribute error_stack.
47 48 49 |
# File 'tarantool-client/lib/tarantool/client/errors.rb', line 47 def error_stack @error_stack end |
#schema_version ⇒ Object (readonly)
Returns the value of attribute schema_version.
47 48 49 |
# File 'tarantool-client/lib/tarantool/client/errors.rb', line 47 def schema_version @schema_version end |
Class Method Details
.from_response(response) ⇒ Object
49 50 51 52 53 54 |
# File 'tarantool-client/lib/tarantool/client/errors.rb', line 49 def self.from_response(response) new( response., code: response.error_code, error_stack: response.error_stack, schema_version: response.schema_version ) end |