View Single Post
  #2  
Old 09-03-2020, 09:59 AM
jdev's Avatar
jdev jdev is offline
VanDyke Technical Support
 
Join Date: Nov 2003
Location: Albuquerque, NM
Posts: 1,099
Quote:
Originally Posted by kva View Post
Sometimes when script tries to connect to unavailable device, the pop-up window tells me: "The specified network name is no longer available". ScriptError does not handle this error? Which exception should?
In your case, I'm not sure if an exception is even being thrown.

Calling Session.Connect() without args is equivalent to pressing the Reconnect button on the toolbar.

If all you are doing is passing on the exception, why even bother with the exception type? If you just use except: without specifying an exception type, I'm thinking that you would most likely still see the pop-up.

The only way to suppress Connect() related pop-up messages via scripting is to supply parameters to the Connect call sufficient to suppress pop-up messages which, in your case I'm guessing isn't how you want to use Connect() (because you likely want to leverage the fact that the tab has already been connected and you just want to have it reconnected since it's been disconnected for some time).

I've added a feature request for a way via scripting to reconnect a tab without any popups so that you can handle connection errors via a script.

I don't have any ETA on when/if this might ever become available, but if it does we can post here and inform you and the forum community.

--Jake
__________________
Jake Devenport
VanDyke Software
Technical Support
YouTube Channel: https://www.youtube.com/vandykesoftware
Email: support@vandyke.com
Web: https://www.vandyke.com/support

Last edited by jdev; 09-08-2020 at 08:33 AM.
Reply With Quote