Exception: Roby::UnreachableEvent

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

Overview

Raised when an event has become unreachable while other parts of the plan where waiting for its emission.

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(generator, reason) ⇒ UnreachableEvent

Create an UnreachableEvent error for the given generator. reason is supposed to be either nil or a plan object which is the reason why generator has become unreachable.



442
443
444
445
446
# File 'lib/roby/standard_errors.rb', line 442

def initialize(generator, reason)
    super(generator)
    @reason = reason
    report_exceptions_from(reason)
end

Instance Attribute Details

#reasonObject (readonly)

Why did the generator become unreachable



437
438
439
# File 'lib/roby/standard_errors.rb', line 437

def reason
  @reason
end

Instance Method Details

#pretty_print(pp) ⇒ Object

:nodoc:



448
449
450
451
452
453
454
455
456
457
# File 'lib/roby/standard_errors.rb', line 448

def pretty_print(pp) # :nodoc:
    pp.text "#{failed_generator} has become unreachable"
    if reason
        reason = [*reason]
        reason.each do |e|
            pp.breakable
            e.pretty_print(pp)
        end
    end
end