Exception: Ably::Exceptions::BaseAblyException
- Inherits:
-
StandardError
- Object
- StandardError
- Ably::Exceptions::BaseAblyException
- Defined in:
- lib/submodules/ably-ruby/lib/ably/exceptions.rb
Overview
Base Ably exception class that contains status and code values used by Ably Refer to github.com/ably/ably-common/blob/master/protocol/errors.json
Direct Known Subclasses
CipherError, ConnectionError, EncoderError, IncompatibleStateForOperation, InsecureRequestError, InvalidPageError, InvalidRequest, InvalidResponseBody, InvalidToken, MessageDeliveryError, ProtocolError, ServerError, Standard, StateChangeError, TokenRequestError, UnsupportedDataTypeError
Instance Attribute Summary collapse
-
#code ⇒ String
readonly
Ably specific error code.
-
#message ⇒ String
readonly
Error message from Ably.
-
#status ⇒ String
readonly
HTTP status code of error.
Instance Method Summary collapse
-
#initialize(message, status = nil, code = nil) ⇒ BaseAblyException
constructor
A new instance of BaseAblyException.
Constructor Details
#initialize(message, status = nil, code = nil) ⇒ BaseAblyException
Returns a new instance of BaseAblyException.
14 15 16 17 18 |
# File 'lib/submodules/ably-ruby/lib/ably/exceptions.rb', line 14 def initialize(, status = nil, code = nil) super @status = status @code = code end |
Instance Attribute Details
#code ⇒ String (readonly)
Returns Ably specific error code.
12 13 14 15 16 17 18 19 |
# File 'lib/submodules/ably-ruby/lib/ably/exceptions.rb', line 12 class BaseAblyException < StandardError attr_reader :status, :code def initialize(, status = nil, code = nil) super @status = status @code = code end end |
#message ⇒ String (readonly)
Returns Error message from Ably.
12 13 14 15 16 17 18 19 |
# File 'lib/submodules/ably-ruby/lib/ably/exceptions.rb', line 12 class BaseAblyException < StandardError attr_reader :status, :code def initialize(, status = nil, code = nil) super @status = status @code = code end end |
#status ⇒ String (readonly)
Returns HTTP status code of error.
12 13 14 15 16 17 18 19 |
# File 'lib/submodules/ably-ruby/lib/ably/exceptions.rb', line 12 class BaseAblyException < StandardError attr_reader :status, :code def initialize(, status = nil, code = nil) super @status = status @code = code end end |