Exception: Roby::TaskEventNotExecutable

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

Attributes inherited from LocalizedError

#failed_event, #failed_generator, #failed_task, #failure_point

Attributes inherited from ExceptionBase

#original_exceptions

Instance Method Summary collapse

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(failure_point) ⇒ TaskEventNotExecutable



178
179
180
181
182
183
# File 'lib/roby/standard_errors.rb', line 178

def initialize(failure_point)
    super(failure_point)
    if !(@plan = failed_generator.task.plan)
        @removed_at = failed_generator.task.removed_at
    end
end

Instance Method Details

#planObject



185
# File 'lib/roby/standard_errors.rb', line 185

def plan; @plan end

#pretty_print(pp) ⇒ Object



188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
# File 'lib/roby/standard_errors.rb', line 188

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

#removed_atObject



186
# File 'lib/roby/standard_errors.rb', line 186

def removed_at; @removed_at end