12-13-2022 10:23 AM
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.
12-13-2022 12:30 PM
What happens when you do this:
axApplicationMgr.GetEngine().StationOptions.RTEOption = 0x1
12-14-2022 06:35 AM
I found the cause of my problem and it is not related to TestStand.
The code actually aborted the test execution explicitly 🙂