Exception: Roby::PlanningFailedError
- Inherits:
-
LocalizedError
- Object
- RuntimeError
- ExceptionBase
- LocalizedError
- Roby::PlanningFailedError
- Includes:
- DRoby::V5::PlanningFailedErrorDumper
- Defined in:
- lib/roby/task_structure/planned_by.rb,
lib/roby/droby/enable.rb
Overview
This exception is raised when a task is abstract, and its planner failed: the system will therefore not have a suitable executable development for this task, and this is a failure
Instance Attribute Summary collapse
-
#failure_reason ⇒ Object
readonly
The reason for the failure.
-
#planning_task ⇒ Object
readonly
The planning task.
Attributes inherited from LocalizedError
#failed_event, #failed_generator, #failed_task, #failure_point
Attributes inherited from ExceptionBase
Instance Method Summary collapse
-
#initialize(planned_task, planning_task, failure_reason: planning_task.failure_reason) ⇒ PlanningFailedError
constructor
A new instance of PlanningFailedError.
-
#planned_task ⇒ Object
The planned task.
- #pretty_print(pp) ⇒ Object
Methods included from DRoby::V5::PlanningFailedErrorDumper
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(planned_task, planning_task, failure_reason: planning_task.failure_reason) ⇒ PlanningFailedError
Returns a new instance of PlanningFailedError.
80 81 82 83 84 85 |
# File 'lib/roby/task_structure/planned_by.rb', line 80 def initialize(planned_task, planning_task, failure_reason: planning_task.failure_reason) super(planned_task) @planning_task = planning_task @failure_reason = failure_reason report_exceptions_from(failure_reason) end |
Instance Attribute Details
#failure_reason ⇒ Object (readonly)
The reason for the failure
78 79 80 |
# File 'lib/roby/task_structure/planned_by.rb', line 78 def failure_reason @failure_reason end |
#planning_task ⇒ Object (readonly)
The planning task
71 72 73 |
# File 'lib/roby/task_structure/planned_by.rb', line 71 def planning_task @planning_task end |
Instance Method Details
#planned_task ⇒ Object
The planned task
74 75 76 |
# File 'lib/roby/task_structure/planned_by.rb', line 74 def planned_task failed_task end |
#pretty_print(pp) ⇒ Object
87 88 89 90 91 92 93 94 95 96 |
# File 'lib/roby/task_structure/planned_by.rb', line 87 def pretty_print(pp) pp.text "failed to plan " planned_task.pretty_print(pp) pp.breakable pp.text "planned by " planning_task.pretty_print(pp) pp.breakable pp.text " failed with " failure_reason.pretty_print(pp) end |