Exception: Roby::PlanningFailedError

Inherits:
LocalizedError show all
Defined in:
lib/roby/relations/planned_by.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

Instance Method Summary collapse

Methods inherited from LocalizedError

#involved_plan_object?, #pretty_print

Constructor Details

#initialize(planned_task, planning_task) ⇒ PlanningFailedError

Returns a new instance of PlanningFailedError.



44
45
46
47
# File 'lib/roby/relations/planned_by.rb', line 44

def initialize(planned_task, planning_task)
    @planned_task = planned_task
    super(planning_task.terminal_event)
end

Instance Attribute Details

#planned_taskObject (readonly)

The planning task



42
43
44
# File 'lib/roby/relations/planned_by.rb', line 42

def planned_task
  @planned_task
end

Instance Method Details

#messageObject

:nodoc:



49
50
51
52
53
54
55
56
57
58
59
# File 'lib/roby/relations/planned_by.rb', line 49

def message # :nodoc:
    msg = "failed to plan #{planned_task}.planned_by(#{failed_task}): failed with #{failure_point.symbol}"
    if failure_point.context
	if failure_point.context.first.respond_to?(:full_message)
	    msg << "\n" << failure_point.context.first.full_message
	else
	    msg << "(" << failure_point.context.first.to_s << ")"
	end
    end
    msg
end