NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How is "Step.Result.Error.Code" used??

How is the "Step.Result.Error.Code" used in returning Error codes? Is it used to return things like "17001" and things like that?

Can I used the variable to return other error codes from my ActiveX calls rather than having to declare a variable?

It seems that the step failure is stored in the "Step.Result.Status" as "Failed"/"Passed"/"Done"/"Skipped", or can the Result Status be determined FROM the Step.Result.Error.Code? On the flip side, does the "Step.Result.Status" cause a "Step.Result.Error.Code" value?

Which one has precidence, or is there no link?

Mike
0 Kudos
Message 1 of 2
(4,421 Views)
Mike -
The three subproperties under Step.Result.Error are set by TestStand only if an error occurs when it fails to call a code module, fails to evaluate expressions for parameter passing, or trying to execute the substeps of a step type. Otherwise, TestStand ignores Step.Result.Error unless a code module sets the Step.Result.Error.Occurred boolean property. When set, TestStand sets Step.Result.Status to "Error" and assumes that who ever set the boolean flag, also set the Msg and Code subproperties.

Scott Richardson (NI)
Scott Richardson
https://testeract.com
0 Kudos
Message 2 of 2
(4,421 Views)