Exception: Lightstreamer::ProtocolError
- Inherits:
-
StandardError
- Object
- StandardError
- Lightstreamer::ProtocolError
- Defined in:
- lib/lightstreamer/protocol_error.rb
Overview
This error class is raised by Session when a request to the Lightstreamer API fails with a Lightstreamer-specific error code and error message.
Instance Attribute Summary collapse
-
#code ⇒ Fixnum
readonly
The numeric code of the Lightstreamer error.
-
#error ⇒ String
readonly
A description of the Lightstreamer error that occurred.
Instance Method Summary collapse
-
#initialize(error, code) ⇒ ProtocolError
constructor
Initializes this protocol error with the specific message and code.
Constructor Details
#initialize(error, code) ⇒ ProtocolError
Initializes this protocol error with the specific message and code.
15 16 17 18 19 20 |
# File 'lib/lightstreamer/protocol_error.rb', line 15 def initialize(error, code) @error = error.to_s @code = code.to_i super "Lightstreamer error: #{@error}, code: #{code}" end |
Instance Attribute Details
#code ⇒ Fixnum (readonly)
Returns The numeric code of the Lightstreamer error.
9 10 11 |
# File 'lib/lightstreamer/protocol_error.rb', line 9 def code @code end |
#error ⇒ String (readonly)
Returns A description of the Lightstreamer error that occurred.
6 7 8 |
# File 'lib/lightstreamer/protocol_error.rb', line 6 def error @error end |