03-09-2016 04:16 PM
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?
03-10-2016 01:06 AM
Add the engine callback "ProcessModelPostStepRuntimeError" to your processmodel. It will be called after every runtime error and you can have your error handling there.
03-10-2016 08:09 AM
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.
Hope this helps,
-Doug