Class: Adhearsion::Rayo::DisconnectedError

Inherits:
Error
  • Object
show all
Defined in:
lib/adhearsion/rayo/disconnected_error.rb

Overview

This exception may be raised if the connection to the server is interrupted.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cause = nil, message = nil) ⇒ DisconnectedError

Returns a new instance of DisconnectedError


12
13
14
# File 'lib/adhearsion/rayo/disconnected_error.rb', line 12

def initialize(cause = nil, message = nil)
  @cause, @message = cause, message
end

Instance Attribute Details

#causeObject

Returns the value of attribute cause


10
11
12
# File 'lib/adhearsion/rayo/disconnected_error.rb', line 10

def cause
  @cause
end

#messageObject

Returns the value of attribute message


10
11
12
# File 'lib/adhearsion/rayo/disconnected_error.rb', line 10

def message
  @message
end

Instance Method Details

#to_sObject Also known as: inspect


16
17
18
# File 'lib/adhearsion/rayo/disconnected_error.rb', line 16

def to_s
  "#<#{self.class}: cause=#{cause.inspect} message=#{message.inspect}"
end