Exception: GorgonBunny::TCPConnectionFailed
- Defined in:
- lib/gorgon_bunny/lib/gorgon_bunny/exceptions.rb
Overview
Raised when TCP connection to RabbitMQ fails because of an unresolved hostname, connectivity problem, etc
Instance Attribute Summary collapse
-
#hostname ⇒ Object
readonly
Returns the value of attribute hostname.
-
#port ⇒ Object
readonly
Returns the value of attribute port.
Instance Method Summary collapse
-
#initialize(e, hostname, port) ⇒ TCPConnectionFailed
constructor
A new instance of TCPConnectionFailed.
Constructor Details
#initialize(e, hostname, port) ⇒ TCPConnectionFailed
Returns a new instance of TCPConnectionFailed.
51 52 53 54 55 56 57 58 59 |
# File 'lib/gorgon_bunny/lib/gorgon_bunny/exceptions.rb', line 51 def initialize(e, hostname, port) m = case e when String then e when Exception then e. end super("Could not establish TCP connection to #{hostname}:#{port}: #{m}") end |
Instance Attribute Details
#hostname ⇒ Object (readonly)
Returns the value of attribute hostname.
49 50 51 |
# File 'lib/gorgon_bunny/lib/gorgon_bunny/exceptions.rb', line 49 def hostname @hostname end |
#port ⇒ Object (readonly)
Returns the value of attribute port.
49 50 51 |
# File 'lib/gorgon_bunny/lib/gorgon_bunny/exceptions.rb', line 49 def port @port end |