Exception: Plum::HTTPError

Inherits:
Error
  • Object
show all
Defined in:
lib/plum/errors.rb

Direct Known Subclasses

LocalHTTPError, RemoteHTTPError

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

Instance Method Summary collapse

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, message = nil)
  @http2_error_type = type
  super(message)
end

Instance Attribute Details

#http2_error_typeObject (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_codeObject


30
31
32
# File 'lib/plum/errors.rb', line 30

def http2_error_code
  ERROR_CODES[@http2_error_type]
end