From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
Is there a way to handle excepetions or errors when using .NET assemblies in TestStand? For example, I use .NET Serial Port Class to Open a Com port such as pictured below. If there is an exception, or error when opening the com port, how can I capture that in Teststand such as with Step.Result.Error, or with some other strategy that I can capture the error and examine it in Teststand, rather than popping up a modal exception window?
Add the engine callback "ProcessModelPostStepRuntimeError" to your processmodel. It will be called after every runtime error and you can have your error handling there.
Just check the "Ignore Run-Time Errors" checkbox on the Run Options of the step. Then have a following step look at the Step.Result.Status property and/or the properties under Step.Result.Error.