Be able to call your own function when error happens
In Test Partner you could have your own function get called when an error happens. Like this
Dim oe As TOnError
Set oe = OnError("ScriptErrorHandling.ErrorFunction")
There really isn't a way of doing this in the new Silk Test 13.5 (with .net) the only option is to do a Try catch over your full script which is not reasonable. The funny thing is, the Visual Test has an option to put in an On error and to call an Asset or another Visual Test.
Even the older Silk Test had a Do except which could be doable but not very practical.
1. In the Silk Test Options you have a way of catching the exceptions. Just build onto this to allow me to call my own function when an exception happens.
Or another new function OnError that gets triggered when an exception happens. Then let me use that function like I did before to call my own Function to process the error.
2. Even more, my error function would grab a screen shot of where the error happens, it then sends me an e-mail with the Error (I guess Exception in this case) and the screen shot. You could build this functionality into Silk Test.
The point of the On error was mostly when I was running Regression on a remote box. Errors don't popup on the screen. (Because you want the other scripts to be able to run.) It wasn't until after half of my script would run and check them would I realize something wasn't up and running or something was wrong. With my On Error Function and after a couple of e-mails telling me there is a problem I could fix it and either start Regression over again, or let the others finish without the same problem. Thanks
Max Power commented
Sean you are correct that On error Goto does work, but this is only for going to a label in the current script not calling another function.
But after I thought about this more, I realize this should probably be more added into Silk Central. I'm sure there are some tweaks to the Silk Test code, but really where you need to know if something fails is when you are running the code remotely which is happen through Silk Central. If you are running something through Silk Test you probably can see what is happening and why it failed.
Sean Salisbury commented
VB.Net still supports "On Error Goto" at the moment, si it can still be used in WorkBench scripts and in VB.Net Silk4Net scripts.