Exception: Plum::HTTPError
Direct Known Subclasses
Constant Summary collapse
- ERROR_CODES =
{ no_error: 0x00, protocol_error: 0x01, internal_error: 0x02, flow_control_error: 0x03, settings_timeout: 0x04, stream_closed: 0x05, frame_size_error: 0x06, refused_stream: 0x07, cancel: 0x08, compression_error: 0x09, connect_error: 0x0a, enhance_your_calm: 0x0b, inadequate_security: 0x0c, http_1_1_required: 0x0d }.freeze
Instance Attribute Summary collapse
-
#http2_error_type ⇒ Object
readonly
Returns the value of attribute http2_error_type.
Instance Method Summary collapse
- #http2_error_code ⇒ Object
-
#initialize(type, message = nil) ⇒ HTTPError
constructor
A new instance of HTTPError.
- #to_s ⇒ Object
Constructor Details
#initialize(type, message = nil) ⇒ HTTPError
Returns a new instance of HTTPError.
25 26 27 28 |
# File 'lib/plum/errors.rb', line 25 def initialize(type, = nil) @http2_error_type = type super() end |
Instance Attribute Details
#http2_error_type ⇒ Object (readonly)
Returns the value of attribute http2_error_type.
23 24 25 |
# File 'lib/plum/errors.rb', line 23 def http2_error_type @http2_error_type end |
Instance Method Details
#http2_error_code ⇒ Object
30 31 32 |
# File 'lib/plum/errors.rb', line 30 def http2_error_code ERROR_CODES[@http2_error_type] end |
#to_s ⇒ Object
34 35 36 |
# File 'lib/plum/errors.rb', line 34 def to_s "#{@http2_error_type.to_s.upcase}: #{super}" end |