Exception: Pione::Agent::TimeoutError
- Inherits:
-
StandardError
- Object
- StandardError
- Pione::Agent::TimeoutError
- Defined in:
- lib/pione/agent/agent-exception.rb
Overview
TimeoutError is raised when the agent is timeouted.
Instance Attribute Summary collapse
-
#agent ⇒ Object
readonly
agent timeouted.
-
#agent_states ⇒ Object
readonly
agent states.
-
#sec ⇒ Object
readonly
timeout second.
Instance Method Summary collapse
-
#initialize(agent, states, sec) ⇒ TimeoutError
constructor
A new instance of TimeoutError.
- #message ⇒ Object
Constructor Details
#initialize(agent, states, sec) ⇒ TimeoutError
Returns a new instance of TimeoutError.
21 22 23 24 25 |
# File 'lib/pione/agent/agent-exception.rb', line 21 def initialize(agent, states, sec) @agent = agent @states = states @sec = sec end |
Instance Attribute Details
#agent ⇒ Object (readonly)
agent timeouted
17 18 19 |
# File 'lib/pione/agent/agent-exception.rb', line 17 def agent @agent end |
#agent_states ⇒ Object (readonly)
agent states
18 19 20 |
# File 'lib/pione/agent/agent-exception.rb', line 18 def agent_states @agent_states end |
#sec ⇒ Object (readonly)
timeout second
19 20 21 |
# File 'lib/pione/agent/agent-exception.rb', line 19 def sec @sec end |
Instance Method Details
#message ⇒ Object
27 28 29 30 |
# File 'lib/pione/agent/agent-exception.rb', line 27 def sec = @sec ? "(%s sec)" % @sec : "" "%s timeouted %s at state [%s]" % [@agent, sec, @states.map{|s| s.to_s}.join(", ")] end |