Exception: Promiscuous::Error::Connection
- Defined in:
- lib/promiscuous/error/connection.rb
Instance Attribute Summary collapse
-
#inner ⇒ Object
Returns the value of attribute inner.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(url, options = {}) ⇒ Connection
constructor
A new instance of Connection.
- #message ⇒ Object (also: #to_s)
Constructor Details
#initialize(url, options = {}) ⇒ Connection
Returns a new instance of Connection.
4 5 6 7 8 9 10 |
# File 'lib/promiscuous/error/connection.rb', line 4 def initialize(url, ={}) super(nil) # XXX TODO The url may contain a password, we should filter it out @url = url @inner = [:inner] set_backtrace(@inner.backtrace) if @inner end |
Instance Attribute Details
#inner ⇒ Object
Returns the value of attribute inner.
2 3 4 |
# File 'lib/promiscuous/error/connection.rb', line 2 def inner @inner end |
#url ⇒ Object
Returns the value of attribute url.
2 3 4 |
# File 'lib/promiscuous/error/connection.rb', line 2 def url @url end |
Instance Method Details
#message ⇒ Object Also known as: to_s
12 13 14 15 16 17 18 |
# File 'lib/promiscuous/error/connection.rb', line 12 def if @inner "Lost connection with #{@url}: #{@inner.class}: #{@inner.}" else "Lost connection with #{@url}" end end |