Exception: Tina4Ultipa::ConnectError
- Defined in:
- lib/tina4_ultipa/errors.rb
Overview
Could not connect within the timeout. Names host, port and elapsed seconds.
Instance Attribute Summary collapse
-
#elapsed ⇒ Object
readonly
Returns the value of attribute elapsed.
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#port ⇒ Object
readonly
Returns the value of attribute port.
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(host, port, elapsed, cause: nil) ⇒ ConnectError
constructor
A new instance of ConnectError.
Constructor Details
#initialize(host, port, elapsed, cause: nil) ⇒ ConnectError
Returns a new instance of ConnectError.
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/tina4_ultipa/errors.rb', line 24 def initialize(host, port, elapsed, cause: nil) super( "could not connect to ultipa at #{host}:#{port} within #{format('%.2f', elapsed)}s", code: "UNAVAILABLE", cause: cause, ) @host = host @port = port @elapsed = elapsed end |
Instance Attribute Details
#elapsed ⇒ Object (readonly)
Returns the value of attribute elapsed.
22 23 24 |
# File 'lib/tina4_ultipa/errors.rb', line 22 def elapsed @elapsed end |
#host ⇒ Object (readonly)
Returns the value of attribute host.
22 23 24 |
# File 'lib/tina4_ultipa/errors.rb', line 22 def host @host end |
#port ⇒ Object (readonly)
Returns the value of attribute port.
22 23 24 |
# File 'lib/tina4_ultipa/errors.rb', line 22 def port @port end |