NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Cancel Terminate

I have created an automatic error handler.
When a step errors it goes to the ProcessModelPostStepRuntimeError sequence that I have created.  One of the actions is to run cleanup.  If the error occurs in a subsequence, I want the cleanup of that sequence to be run, return to the calling sequence, and continue execution as normal. 
 
Right now my ProcessModelPostStepRuntimeError captures the error, runs the cleanup of the subsequence, runs the cleanup of the calling sequence, and stops the test.  How can I make the calling sequence continue on in it's execution as normal?
 
0 Kudos
Message 1 of 6
(4,287 Views)

Hi CS,

 

You should beable to perform the API call Execution.CancelTermination method.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 2 of 6
(4,285 Views)

Hi CS,

Also you will need to clear the RunState.SequenceError as well.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 3 of 6
(4,283 Views)

Ray,

RunState.SequenceError was the piece that I was missing. 

Now I have a new issue.  I would still like the result to be logged as "Error", but after clearing RunState.SequenceError the sequence result becomes Pass.

Thanks,

Chad

0 Kudos
Message 4 of 6
(4,276 Views)

Hi Chad,

Rather than clear the Result.Error. Set the TS.IgnoreRTE boolean of the Caller Sequence using RunState.Caller.Step.TS.IgnoreRTE.

This will allow the SequenceCall to record the step but ignore it and continue on with the next step.

Regards

Ray

 

Regards
Ray Farmer
0 Kudos
Message 5 of 6
(4,257 Views)
You can also set this option though the Step Settings panel/pane instead of through the TS container if you know that you want to ignore the errors when building the sequence.  Simply go to the Run Options of the sequence call step, and select Ignore Run-Time Errors.
 
Of course, if you programmatically want to ignore the errors or not, you can still use Step.TS.IgnoreRTE.
Josh W.
Certified TestStand Architect
Formerly blue
0 Kudos
Message 6 of 6
(4,224 Views)