Exception: Ably::Exceptions::BaseAblyException

Inherits:
StandardError
  • Object
show all
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

Instance Attribute Summary collapse

Instance Method Summary collapse

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(message, status = nil, code = nil)
  super message
  @status = status
  @code = code
end

Instance Attribute Details

#codeString (readonly)

Returns Ably specific error code.

Returns:

  • (String)

    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(message, status = nil, code = nil)
    super message
    @status = status
    @code = code
  end
end

#messageString (readonly)

Returns Error message from Ably.

Returns:

  • (String)

    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(message, status = nil, code = nil)
    super message
    @status = status
    @code = code
  end
end

#statusString (readonly)

Returns HTTP status code of error.

Returns:

  • (String)

    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(message, status = nil, code = nil)
    super message
    @status = status
    @code = code
  end
end