class Roby::EventStructure::OccurenceConstraintViolation

Exception raised when an event gets emitted outside its specified temporal constraints

Attributes

allowed_interval[R]
count[R]
parent_generator[R]
since[R]

Public Class Methods

new(event, parent_generator, count, allowed_interval, since) click to toggle source
Calls superclass method Roby::LocalizedError::new
# File lib/roby/event_structure/temporal_constraints.rb, line 107
def initialize(event, parent_generator, count, allowed_interval, since)
    super(event)
    @parent_generator = parent_generator
    @count = count
    @allowed_interval = allowed_interval
    @since = since
end

Public Instance Methods

pretty_print(pp) click to toggle source
# File lib/roby/event_structure/temporal_constraints.rb, line 115
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