NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Run-time error is not logged to database when RTEOption = RTEOptions.RTEOption_Continue

I'm trying to get Run-time errors logged to the database in my C# program using the API.

When I run the simpel example program supplied in the install folder of TestStand (TestStand 2017 - UserInterfaces\Source Code\Simple\CSharp\) with a short test sequence that has a deliberate run-time error, it works as expected.
The UI shows the Run-time exception dialog and I can select "Run Cleanup" and the error is logged in the database.

However, when I run my application that is using the API to run the test sequence and the Run-Time error dialog is shown, selecting "Run Cleanup" does not log the error in the database.

If I set the axApplicationMgr.GetEngine().StationOptions.RTEOption = RTEOptions.RTEOption_Continue, then the dialog is not shown but the error is logged in the database.

Have I missed an option?
I have compared NI the sample code with my implementation and I cannot see the difference.
How can I setup a callback or event listener that will fire when the rin-time exception is hit?
The axApplicationMgr.BreakOnRunTimeError += AxApplicationMgr_BreakOnRunTimeError does not fire, if RTEOption  =RTEOptions.RTEOption_ShowDialog.

0 Kudos
Message 1 of 3
(658 Views)

What happens when you do this:

axApplicationMgr.GetEngine().StationOptions.RTEOption = 0x1

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 3
(636 Views)

I found the cause of my problem and it is not related to TestStand.
The code actually aborted the test execution explicitly 🙂

0 Kudos
Message 3 of 3
(606 Views)