Exception: Ticketing::TicketError
- Inherits:
-
StandardError
- Object
- StandardError
- Ticketing::TicketError
- Defined in:
- lib/ticketing/errors.rb
Overview
Client error with a machine-checkable kind. 종류를 코드로 판별할 수 있는 오류.
Kinds — :timeout (wait 안에 획득 실패) / :not_connected (연결 없음) / :auth (토큰 거부) / :invalid_input (잘못된 입력) / :protocol (규격 외 응답) / :io (전송 오류) / :connection_aborted (장애조치 중단 — 내부 재시도).
Instance Attribute Summary collapse
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
Class Method Summary collapse
Instance Method Summary collapse
- #aborted? ⇒ Boolean
-
#initialize(kind, message) ⇒ TicketError
constructor
A new instance of TicketError.
Constructor Details
#initialize(kind, message) ⇒ TicketError
Returns a new instance of TicketError.
12 13 14 15 |
# File 'lib/ticketing/errors.rb', line 12 def initialize(kind, ) super() @kind = kind end |
Instance Attribute Details
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
10 11 12 |
# File 'lib/ticketing/errors.rb', line 10 def kind @kind end |
Class Method Details
.aborted ⇒ Object
17 |
# File 'lib/ticketing/errors.rb', line 17 def self.aborted = new(:connection_aborted, "connection closed") |
Instance Method Details
#aborted? ⇒ Boolean
19 |
# File 'lib/ticketing/errors.rb', line 19 def aborted? = kind == :connection_aborted |