Exception: Roby::EventStructure::OccurenceConstraintViolation
- Inherits:
-
LocalizedError
- Object
- RuntimeError
- Roby::ExceptionBase
- LocalizedError
- Roby::EventStructure::OccurenceConstraintViolation
- 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_interval ⇒ Object
readonly
Returns the value of attribute allowed_interval.
-
#count ⇒ Object
readonly
Returns the value of attribute count.
-
#parent_generator ⇒ Object
readonly
Returns the value of attribute parent_generator.
-
#since ⇒ Object
readonly
Returns the value of attribute since.
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, count, allowed_interval, since) ⇒ OccurenceConstraintViolation
constructor
A new instance of OccurenceConstraintViolation.
- #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, count, allowed_interval, since) ⇒ OccurenceConstraintViolation
Returns a new instance of OccurenceConstraintViolation.
106 107 108 109 110 111 112 |
# File 'lib/roby/event_structure/temporal_constraints.rb', line 106 def initialize(event, parent_generator, count, allowed_interval, since) super(event) @parent_generator = parent_generator @count = count @allowed_interval = allowed_interval @since = since end |
Instance Attribute Details
#allowed_interval ⇒ Object (readonly)
Returns the value of attribute allowed_interval.
104 105 106 |
# File 'lib/roby/event_structure/temporal_constraints.rb', line 104 def allowed_interval @allowed_interval end |
#count ⇒ Object (readonly)
Returns the value of attribute count.
104 105 106 |
# File 'lib/roby/event_structure/temporal_constraints.rb', line 104 def count @count end |
#parent_generator ⇒ Object (readonly)
Returns the value of attribute parent_generator.
104 105 106 |
# File 'lib/roby/event_structure/temporal_constraints.rb', line 104 def parent_generator @parent_generator end |
#since ⇒ Object (readonly)
Returns the value of attribute since.
104 105 106 |
# File 'lib/roby/event_structure/temporal_constraints.rb', line 104 def since @since end |
Instance Method Details
#pretty_print(pp) ⇒ Object
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/roby/event_structure/temporal_constraints.rb', line 114 def pretty_print(pp) pp.text "Got " failed_event.pretty_print(pp) pp.breakable pp.text "This does not satisfy the occurance constraint [#{allowed_interval[0]}, #{allowed_interval[1]}] from" pp.nest(2) do pp.breakable parent_generator.pretty_print(pp) end pp.breakable pp.text "which has been emitted #{count} times" if since pp.text " since #{since}" end end |