Exception: Roby::FailedToStart

Inherits:
LocalizedError show all
Defined in:
lib/roby/standard_errors.rb

Overview

Representation of a task’s failure to start

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(failed_task, reason, time) ⇒ FailedToStart

Returns a new instance of FailedToStart.



464
465
466
467
468
469
470
# File 'lib/roby/standard_errors.rb', line 464

def initialize(failed_task, reason, time)
    super(failed_task)

    report_exceptions_from(reason)
    @time = time
    @reason = reason
end

Instance Attribute Details

#reasonObject (readonly)

Returns the value of attribute reason.



462
463
464
# File 'lib/roby/standard_errors.rb', line 462

def reason
  @reason
end

#timeObject (readonly)

Returns the value of attribute time.



462
463
464
# File 'lib/roby/standard_errors.rb', line 462

def time
  @time
end

Instance Method Details

#pretty_print(pp) ⇒ Object



472
473
474
475
476
# File 'lib/roby/standard_errors.rb', line 472

def pretty_print(pp)
    pp.text "#{self} failed to start at #{Roby.format_time(time)} because of"
    pp.breakable
    @reason.pretty_print(pp)
end