Exception: Roby::UnreachableEvent
- Inherits:
-
LocalizedError
- Object
- RuntimeError
- ExceptionBase
- LocalizedError
- Roby::UnreachableEvent
- 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
-
#reason ⇒ Object
readonly
Why did the generator become unreachable.
Attributes inherited from LocalizedError
#failed_event, #failed_generator, #failed_task, #failure_point
Attributes inherited from ExceptionBase
Instance Method Summary collapse
-
#initialize(generator, reason) ⇒ UnreachableEvent
constructor
Create an UnreachableEvent error for the given
generator
. -
#pretty_print(pp) ⇒ Object
:nodoc:.
Methods inherited from LocalizedError
#fatal?, #involved_plan_object?, match, #propagated?, #to_execution_exception, to_execution_exception_matcher
Methods included from DRoby::V5::LocalizedErrorDumper
Methods inherited from ExceptionBase
#each_original_exception, #report_exceptions_from
Methods included from DRoby::V5::ExceptionBaseDumper
Methods included from DRoby::V5::Builtins::ExceptionDumper
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
#reason ⇒ Object (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 |