Quote:
Originally Posted by shindigo
Hi all -
I'm looking for some advice on handling exceptional cases in a CommandGroup.
The most common situation we are considering is if one of the commands times out, we want to cancel the whole group, and/or maybe schedule a different group.
Is there any way to do this directly within a CommandGroup or do I have to have the subsystem(s) keep track of what timed out and feed that information on to subsequent commands?
tia -
mp
|
I haven't tried to do this, but since it's been a couple of days, I'll throw out some possibly wild pitches:
Perhaps if you throw an exception that CommandGroup is not ready for, it will stop execution of the group.
Another possibility (sounds a bit more likely) I found in the documentation was:
Quote:
|
Any command in the main sequence .. that requires a subsystem in use by a parallel command will cause the parallel command to be canceled.
|
So, if you start a new command group that requires the same subsystems, it should (as I read the docs) effectively cancel and replace the original command group, which sounds like what you want.