Class: Protocol::HTTP2::ProtocolError

Inherits:
Error
  • Object
show all
Defined in:
lib/protocol/http2/error.rb

Overview

Raised by stream or connection handlers, results in GOAWAY frame which signals termination of the current connection. You cannot recover from this exception, or any exceptions subclassed from it.

Constant Summary

Constants inherited from Error

Error::CANCEL, Error::COMPRESSION_ERROR, Error::CONNECT_ERROR, Error::ENHANCE_YOUR_CALM, Error::FLOW_CONTROL_ERROR, Error::FRAME_SIZE_ERROR, Error::HTTP_1_1_REQUIRED, Error::INADEQUATE_SECURITY, Error::INTERNAL_ERROR, Error::NO_ERROR, Error::PROTOCOL_ERROR, Error::REFUSED_STREAM, Error::SETTINGS_TIMEOUT, Error::STREAM_CLOSED

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, code = PROTOCOL_ERROR) ⇒ ProtocolError

Returns a new instance of ProtocolError.



80
81
82
83
84
# File 'lib/protocol/http2/error.rb', line 80

def initialize(message, code = PROTOCOL_ERROR)
	super(message)
	
	@code = code
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



86
87
88
# File 'lib/protocol/http2/error.rb', line 86

def code
  @code
end