Exception: Roby::Coordination::Models::UnreachableStateUsed
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Roby::Coordination::Models::UnreachableStateUsed
- Defined in:
- lib/roby/coordination/models/exceptions.rb
Overview
Exception raised in state machine definitions when a state is used in a transition, that cannot be reached in the first place
Instance Attribute Summary collapse
-
#states ⇒ Object
readonly
The set of unreachable states.
Instance Method Summary collapse
-
#initialize(states) ⇒ UnreachableStateUsed
constructor
A new instance of UnreachableStateUsed.
- #pretty_print(pp) ⇒ Object
Constructor Details
#initialize(states) ⇒ UnreachableStateUsed
Returns a new instance of UnreachableStateUsed.
19 20 21 22 23 |
# File 'lib/roby/coordination/models/exceptions.rb', line 19 def initialize(states) super() @states = states end |
Instance Attribute Details
#states ⇒ Object (readonly)
The set of unreachable states
17 18 19 |
# File 'lib/roby/coordination/models/exceptions.rb', line 17 def states @states end |
Instance Method Details
#pretty_print(pp) ⇒ Object
25 26 27 28 29 30 31 32 33 |
# File 'lib/roby/coordination/models/exceptions.rb', line 25 def pretty_print(pp) pp.text "#{states.size} states are unreachable but used in transitions anyways" pp.nest(2) do pp.seplist(states) do |s| pp.breakable s.pretty_print(pp) end end end |