Class: Protocol::WebSocket::ProtocolError
- Defined in:
- lib/protocol/websocket/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.
Direct Known Subclasses
Constant Summary
Constants inherited from Error
Error::GOING_AWAY, Error::INTERNAL_ERROR, Error::INVALID_DATA, Error::INVALID_PAYLOAD, Error::MESSAGE_TOO_LARGE, Error::MISSING_EXTENSION, Error::NO_ERROR, Error::POLICY_VIOLATION, Error::PROTOCOL_ERROR
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
- #The status code associated with the error.(statuscodeassociatedwiththeerror.) ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(message, code = PROTOCOL_ERROR) ⇒ ProtocolError
constructor
Initialize a protocol error with an optional status code.
Constructor Details
#initialize(message, code = PROTOCOL_ERROR) ⇒ ProtocolError
Initialize a protocol error with an optional status code.
47 48 49 50 51 |
# File 'lib/protocol/websocket/error.rb', line 47 def initialize(, code = PROTOCOL_ERROR) super() @code = code end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
54 55 56 |
# File 'lib/protocol/websocket/error.rb', line 54 def code @code end |
#The status code associated with the error.(statuscodeassociatedwiththeerror.) ⇒ Object (readonly)
54 |
# File 'lib/protocol/websocket/error.rb', line 54 attr :code |