Exception: TCPClient::TimeoutError

Inherits:
NetworkError show all
Defined in:
lib/tcp-client/errors.rb

Overview

Base exception class for a detected timeout.

You should catch this exception class when you like to handle any timeout error.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTimeoutError #initialize(message) ⇒ TimeoutError

Initializes the instance with an optional message.

The message will be generated from #action when not specified.

Parameters:

  • message (#to_s) (defaults to: nil)

    the error message



89
90
91
# File 'lib/tcp-client/errors.rb', line 89

def initialize(message = nil)
  super(message || "unable to #{action} in time")
end

Instance Attribute Details

#actionSymbol (readonly)

Returns the action which timed out.

Returns:

  • (Symbol)

    the action which timed out



97
# File 'lib/tcp-client/errors.rb', line 97

def action = :process