Exception: GQTP::ConnectionError

Inherits:
Error
  • Object
show all
Defined in:
lib/gqtp/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(host, port, detail) ⇒ ConnectionError

Returns a new instance of ConnectionError.



27
28
29
30
31
32
33
# File 'lib/gqtp/error.rb', line 27

def initialize(host, port, detail)
  @host = host
  @port    = port
  @detail  = detail
  super("Failed to connect to <#{@host}:#{@port}>: " +
          "#{@detail.message} (#{@detail.class})")
end

Instance Attribute Details

#detailObject (readonly)

Returns the value of attribute detail.



26
27
28
# File 'lib/gqtp/error.rb', line 26

def detail
  @detail
end

#hostObject (readonly)

Returns the value of attribute host.



24
25
26
# File 'lib/gqtp/error.rb', line 24

def host
  @host
end

#portObject (readonly)

Returns the value of attribute port.



25
26
27
# File 'lib/gqtp/error.rb', line 25

def port
  @port
end