Exception: AMQP::TCPConnectionFailed

Inherits:
Error
  • Object
show all
Defined in:
lib/amqp/exceptions.rb

Overview

Raised when initial TCP connection to the broker fails.

Instance Attribute Summary collapse

Attributes inherited from Error

#cause

Instance Method Summary collapse

Constructor Details

#initialize(settings, cause = nil) ⇒ TCPConnectionFailed

Returns a new instance of TCPConnectionFailed.



29
30
31
32
33
34
# File 'lib/amqp/exceptions.rb', line 29

def initialize(settings, cause = nil)
  @settings = settings
  @cause    = cause

  super("Could not establish TCP connection to #{@settings[:host]}:#{@settings[:port]}")
end

Instance Attribute Details

#settingsHash (readonly)

Returns connection settings that were used.

Returns:

  • (Hash)

    connection settings that were used



27
28
29
# File 'lib/amqp/exceptions.rb', line 27

def settings
  @settings
end