02-22-2006 08:39 AM
Hi
I have a sequence where I communicate with some hardware through an snmp adapter (ActiveX component). If I perform an illegal snmp operation, then the adapter will throw an exception.
Is it possible to capture this exception from TestStand ?
As it is now my sequence file will just stop with a runtime error.
I use TestStand v.3.1
Regards
Claus
02-22-2006 09:47 AM
Hi,
I think you need TS 3.5
Regards
Ray Farmer
02-22-2006 12:05 PM
What feature of 3.5 are you thinking of?
Try setting Step Properties>>Run Options>>Ignore Run-Time Errors on the ActiveX step and then inspect the sub-properties of RunState.PreviousStep.Result.Error in the following step to determine if the exception occurred. This should work in 3.1.
02-22-2006 03:03 PM
02-22-2006 03:31 PM
02-27-2006 03:35 AM
05-16-2006 03:02 AM - edited 05-16-2006 03:02 AM
Message Edited by Yuri_IL on 05-16-2006 03:03 AM
05-17-2006 03:39 AM
I got the full answer from NI support, here it:
"
Exceptions thrown from external code modules will be stored in Step.Result.Error . You can select in TestStand how you want it to handle the error by going to Configure>>Station Options>>Execution, and then setting the drop down for 'On Run-time Error' to the behavior you want.
You can program your own error handling by using the SequenceFilePostStepRuntimeError callback. There is an example on how to use this callback in the example below.
C:\Program Files\National Instruments\TestStand 3.5\Examples\Callbacks\PostStepRuntimeErrorCallback
This sequence will allow the user to choose how to handle the error. You can customize this sequence, or create your own, to handle exceptions how you desire.
"
Have a nice day! 🙂
05-17-2006 02:42 PM