Exception: Roby::PlanningFailedError

Inherits:
LocalizedError show all
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

Attributes inherited from LocalizedError

#failed_event, #failed_generator, #failed_task, #failure_point

Attributes inherited from ExceptionBase

#original_exceptions

Instance Method Summary collapse

Methods included from DRoby::V5::PlanningFailedErrorDumper

#droby_dump

Methods inherited from LocalizedError

#fatal?, #involved_plan_object?, match, #propagated?, #to_execution_exception, to_execution_exception_matcher

Methods included from DRoby::V5::LocalizedErrorDumper

#droby_dump

Methods inherited from ExceptionBase

#each_original_exception, #report_exceptions_from

Methods included from DRoby::V5::ExceptionBaseDumper

#droby_dump

Methods included from DRoby::V5::Builtins::ExceptionDumper

#droby_dump

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_reasonObject (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_taskObject (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_taskObject

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