NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I read the error information out of the execution object?

I am trying to determine if my sequence execution passed or failed using an instance of the execution object. From my implementation of the ProcessUIMessageEventEngine engine callback, I wait for a TS::UIMsg_EndExecution message, and then access my member TS::ExecutionPtr pointer to read the error properties.

TS::PropertyObjectPtr spError;
BOOL bErrorOccured = FALSE;
spError = m_spCurrentExecution->GetErrorObject();
bErrorOccurred = spError->GetValBoolean( "Occurred", TS::PropOption_NoOptions );

The problem is that 'bErrorOccurred' always comes back FALSE, even when the sequence errors out.

Is this not the correct way to read out the execution error information? Am I trying to read the error from the
wrong message? I tried using UIMsg_BreakOnRunTimeError instead and got the same result...

Thanks,

Aaron
0 Kudos
Message 1 of 2
(2,752 Views)
Aaron -
The result of an execution can be determined by looking at two places. If an error occurred, looking at Execution.ErrorObject is correct. If the execution passed, failed, terminated, or errored, you could look at Execution.ResultStatus. This property is a string value.

If you are using a process model entry point like TestUUTs, depending on the implementation of the process model sequence, the error object and status might not be the accumulation of the one or more client sequence calls that it makes, because the call to MainSequence in the client file typically masks the status from setting the process model status and there may be no logic to ensure that if one UUT errored that the overall Test UUTs sequence was also error. TestStand 3.0'
s default process models tried to make this behavior more consistent.

Scott Richardson (NI)
Scott Richardson
0 Kudos
Message 2 of 2
(2,752 Views)