The error message when trying to exit a nested machine with the command "on" instead of "exit" doesn't give enough information. For example:
(machine root
(var out := [false])
(state one
(machine nested
(state onen)
(on goout onen->two)
(event goout [out]))
(onentry (spawn nested onen))
)
(state two)
)
(spawn root one)
shows the following error message:
In machine: nested, state two is not found
Which should be more specific for this particular issue.