Exception: Roby::EventStructure::TemporalConstraintViolation
- Inherits:
-
LocalizedError
- Object
- RuntimeError
- Roby::ExceptionBase
- LocalizedError
- Roby::EventStructure::TemporalConstraintViolation
- Defined in:
- lib/roby/event_structure/temporal_constraints.rb
Overview
Exception raised when an event gets emitted outside its specified temporal constraints
Instance Attribute Summary collapse
-
#allowed_intervals ⇒ Object
readonly
Returns the value of attribute allowed_intervals.
-
#parent_generator ⇒ Object
readonly
Returns the value of attribute parent_generator.
Attributes inherited from LocalizedError
#failed_event, #failed_generator, #failed_task, #failure_point
Attributes inherited from Roby::ExceptionBase
Instance Method Summary collapse
-
#initialize(event, parent_generator, allowed_intervals) ⇒ TemporalConstraintViolation
constructor
A new instance of TemporalConstraintViolation.
- #pretty_print(pp) ⇒ Object
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 Roby::ExceptionBase
#each_original_exception, #report_exceptions_from
Methods included from DRoby::V5::ExceptionBaseDumper
Methods included from DRoby::V5::Builtins::ExceptionDumper
Constructor Details
#initialize(event, parent_generator, allowed_intervals) ⇒ TemporalConstraintViolation
Returns a new instance of TemporalConstraintViolation.
84 85 86 87 88 |
# File 'lib/roby/event_structure/temporal_constraints.rb', line 84 def initialize(event, parent_generator, allowed_intervals) super(event) @parent_generator = parent_generator @allowed_intervals = allowed_intervals.dup end |
Instance Attribute Details
#allowed_intervals ⇒ Object (readonly)
Returns the value of attribute allowed_intervals.
82 83 84 |
# File 'lib/roby/event_structure/temporal_constraints.rb', line 82 def allowed_intervals @allowed_intervals end |
#parent_generator ⇒ Object (readonly)
Returns the value of attribute parent_generator.
82 83 84 |
# File 'lib/roby/event_structure/temporal_constraints.rb', line 82 def parent_generator @parent_generator end |
Instance Method Details
#pretty_print(pp) ⇒ Object
90 91 92 93 94 95 96 97 98 |
# File 'lib/roby/event_structure/temporal_constraints.rb', line 90 def pretty_print(pp) pp.text "Got " failed_event.pretty_print(pp) pp.text "It breaks the temporal constraint(s) #{allowed_intervals.map { |min, max| "[#{min}, #{max}]" }.join(' | ')} from" pp.nest(2) do pp.breakable parent_generator.pretty_print(pp) end end |