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 collapse

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

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

#planObject (readonly)

Returns the value of attribute plan.



193
194
195
# File 'lib/roby/standard_errors.rb', line 193

def plan
  @plan
end

#removed_atObject (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