Re: Error-handling example for Session object in VBScript?

Error-handling example for Session object in VBScript?

2012-03-08 21:21

I just used the new COM Library to connect to my router (Cisco/Linksys router with TomatoUSB firmware) and enable/disable its wireless radio. I needed to accomplish this without using a command-line interface and WinSCP's new COM Library did the trick. Thank you for this new and very powerful functionality.

VBScript does not offer try/catch so the existing error-handling examples for C#, VB.NET and JScript cannot be used for VBScript. I would appreciate it if you could provide an example of how to test for errors generated by the Session object when used in VBScript. For example, an error may arise after using its Open or ExecuteCommand methods.