Exception: TriCoreDB::ServerError
- Defined in:
- lib/tricoredb/errors.rb
Overview
The server processed the request and did not complete it: a RESPONSE whose
status is not ok, or an ERROR frame answering a request.
Instance Attribute Summary collapse
-
#response ⇒ Response?
readonly
The full response, for its diagnostics.
-
#status ⇒ String?
readonly
errorornot_implementedfor a RESPONSE; nil for an ERROR frame.
Attributes inherited from Error
Instance Method Summary collapse
-
#frame? ⇒ Boolean
True when the refusal arrived as an ERROR frame rather than a RESPONSE.
-
#initialize(message = nil, code: nil, leader_hint: nil, status: nil, response: nil, frame: false) ⇒ ServerError
constructor
A new instance of ServerError.
Methods inherited from Error
Constructor Details
#initialize(message = nil, code: nil, leader_hint: nil, status: nil, response: nil, frame: false) ⇒ ServerError
Returns a new instance of ServerError.
61 62 63 64 65 66 |
# File 'lib/tricoredb/errors.rb', line 61 def initialize( = nil, code: nil, leader_hint: nil, status: nil, response: nil, frame: false) super(, code: code, leader_hint: leader_hint) @status = status @response = response @frame = frame end |
Instance Attribute Details
#response ⇒ Response? (readonly)
Returns the full response, for its diagnostics.
59 60 61 |
# File 'lib/tricoredb/errors.rb', line 59 def response @response end |
#status ⇒ String? (readonly)
Returns error or not_implemented for a RESPONSE; nil for an ERROR frame.
57 58 59 |
# File 'lib/tricoredb/errors.rb', line 57 def status @status end |
Instance Method Details
#frame? ⇒ Boolean
Returns true when the refusal arrived as an ERROR frame rather than a RESPONSE.
69 70 71 |
# File 'lib/tricoredb/errors.rb', line 69 def frame? @frame end |