class ProtocolError
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.
Definitions
def self.for(code)
Build a protocol error for a given HTTP/2 error code.
Signature
-
parameter
codeInteger The HTTP/2 error code.
-
returns
ProtocolError The protocol error.
Implementation
def self.for(code)
return self.new(Error.message_for(code), code)
end
def initialize(message, code = PROTOCOL_ERROR)
Initialize a protocol error with message and error code.
Signature
-
parameter
messageString The error message.
-
parameter
codeInteger The HTTP/2 error code.
Implementation
def initialize(message, code = PROTOCOL_ERROR)
super(message)
@code = code
end