Class: Roby::TaskStructure::ConflictError
- Defined in:
- lib/roby/task_structure/conflicts.rb
Overview
Class holding conflict error information
Note that it is not an exception as a failed conflict is usually handled by calling #failed_to_start! on the newly started task
Instance Attribute Summary collapse
-
#running_tasks ⇒ Object
readonly
Returns the value of attribute running_tasks.
-
#starting_task ⇒ Object
readonly
Returns the value of attribute starting_task.
Instance Method Summary collapse
-
#initialize(starting_task, running_tasks) ⇒ ConflictError
constructor
A new instance of ConflictError.
- #pretty_print(pp) ⇒ Object
Constructor Details
#initialize(starting_task, running_tasks) ⇒ ConflictError
Returns a new instance of ConflictError.
82 83 84 |
# File 'lib/roby/task_structure/conflicts.rb', line 82 def initialize(starting_task, running_tasks) @starting_task, @running_tasks = starting_task, running_tasks end |
Instance Attribute Details
#running_tasks ⇒ Object (readonly)
Returns the value of attribute running_tasks.
80 81 82 |
# File 'lib/roby/task_structure/conflicts.rb', line 80 def running_tasks @running_tasks end |
#starting_task ⇒ Object (readonly)
Returns the value of attribute starting_task.
79 80 81 |
# File 'lib/roby/task_structure/conflicts.rb', line 79 def starting_task @starting_task end |
Instance Method Details
#pretty_print(pp) ⇒ Object
86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/roby/task_structure/conflicts.rb', line 86 def pretty_print(pp) pp.text "failed to start " starting_task.pretty_print(pp) pp.text "because it conflicts with #{running_tasks.size} running tasks" pp.nest(2) do runnning_tasks.each do |t| pp.breakable t.pretty_print(pp) end end end |