Exception: Rootage::PhaseTimeoutError

Inherits:
Error
  • Object
show all
Defined in:
lib/rootage/exception.rb

Overview

PhaseTimeoutError is raised when command phase exceeds time limit.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scenario_name, phase_name, action_name = nil) ⇒ PhaseTimeoutError

Returns a new instance of PhaseTimeoutError.



44
45
46
47
48
# File 'lib/rootage/exception.rb', line 44

def initialize(scenario_name, phase_name, action_name=nil)
  @scenario_name = scenario_name
  @phase_name = phase_name
  @action_name = action_name
end

Instance Attribute Details

#action_nameObject

Returns the value of attribute action_name.



42
43
44
# File 'lib/rootage/exception.rb', line 42

def action_name
  @action_name
end

#phase_nameObject

Returns the value of attribute phase_name.



41
42
43
# File 'lib/rootage/exception.rb', line 41

def phase_name
  @phase_name
end

#scenario_nameObject

Returns the value of attribute scenario_name.



40
41
42
# File 'lib/rootage/exception.rb', line 40

def scenario_name
  @scenario_name
end

Instance Method Details

#messageObject



50
51
52
53
# File 'lib/rootage/exception.rb', line 50

def message
  arg = {scnario: @scenario_name, phase: @phase_name, action: @action_name}
  '"%{scenario}" has timeouted at action "%{action}" in phase "%{phase}".' % arg
end