NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

propogating errors

Hello,

   I have three sequence files - seq1, seq2 and seq3... And seq1 has a step in which it calls seq2, and se2 has a step where it calls seq3. Now if an error occurs in a step in seq3, and i check the error code of that step, then i can verify that it is non-zero. However, if i choose to ignore this error, and continue, then i can see that the step that actually made this call to seq3 has error code 0 (i.e. it showed that it passed). How can i propogate the error codes and msg to the upper levels during such nesting, so that i can have seq1 handle alll errors ?

   What i am trying to do is that, i want to be able to handle the error in my own way, and before actually handling the error, i may have to do some other operations such as creating a report or some other thing? How can i get this behaviour?

Thanks,
Regards,
Aparna

0 Kudos
Message 1 of 2
(2,521 Views)

The expected way to do that is to not ignore the error and to put the steps that must run whether or not an error occurs in your cleanup step group. If you have cleanup steps that should only execute when an error occurs, you can give them a precondition of:

RunState.SequenceError.Occurred

 

Another method of customizing error handling is to define a SequenceFilePostStepRuntimeError callback sequence in your sequence file, or a ProcessModelPostStepRuntimeError callback sequence in your process model.  There is an example in:

TestStand\Examples\Callbacks\PostStepRuntimeErrorCallback\

0 Kudos
Message 2 of 2
(2,515 Views)