Exception: Roby::TaskEventNotExecutable
- Inherits:
-
EventNotExecutable
- Object
- RuntimeError
- ExceptionBase
- LocalizedError
- EventNotExecutable
- Roby::TaskEventNotExecutable
- Defined in:
- lib/roby/standard_errors.rb
Overview
Same error than EventNotExecutable, but for task events
The only difference is that this method displays some task-specific information
Instance Attribute Summary collapse
-
#plan ⇒ Object
readonly
Returns the value of attribute plan.
-
#removed_at ⇒ Object
readonly
Returns the value of attribute removed_at.
Attributes inherited from LocalizedError
#failed_event, #failed_generator, #failed_task, #failure_point
Attributes inherited from ExceptionBase
Instance Method Summary collapse
-
#initialize(failure_point) ⇒ TaskEventNotExecutable
constructor
A new instance of TaskEventNotExecutable.
- #pretty_print(pp) ⇒ Object
Methods inherited from LocalizedError
#fatal?, #involved_plan_object?, match, #propagated?, #to_execution_exception, to_execution_exception_matcher
Methods included from DRoby::V5::LocalizedErrorDumper
Methods inherited from ExceptionBase
#each_original_exception, #report_exceptions_from
Methods included from DRoby::V5::ExceptionBaseDumper
Methods included from DRoby::V5::Builtins::ExceptionDumper
Constructor Details
#initialize(failure_point) ⇒ TaskEventNotExecutable
Returns a new instance of TaskEventNotExecutable.
186 187 188 189 190 191 |
# File 'lib/roby/standard_errors.rb', line 186 def initialize(failure_point) super(failure_point) unless (@plan = failed_generator.task.plan) @removed_at = failed_generator.task.removed_at end end |
Instance Attribute Details
#plan ⇒ Object (readonly)
Returns the value of attribute plan.
193 194 195 |
# File 'lib/roby/standard_errors.rb', line 193 def plan @plan end |
#removed_at ⇒ Object (readonly)
Returns the value of attribute removed_at.
193 194 195 |
# File 'lib/roby/standard_errors.rb', line 193 def removed_at @removed_at end |
Instance Method Details
#pretty_print(pp) ⇒ Object
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 |
# File 'lib/roby/standard_errors.rb', line 195 def pretty_print(pp) pp.text "#{failed_generator.symbol} called but it is not executable on" pp.breakable failed_generator.task.pretty_print(pp) pp.breakable if plan pp.text "the task has NOT been garbage collected" elsif removed_at pp.text "#{failed_generator.task} has been removed from its plan at" removed_at.each do |line| pp.breakable pp.text " #{line}" end else pp.text "the task has never been included in a plan" end end |