MS msg "Connection Closed Gracefully". Can I catch

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Dick99999
Pro Scripter
Posts: 84
Joined: Thu Nov 27, 2008 10:25 am
Location: Netherlands

MS msg "Connection Closed Gracefully". Can I catch

Post by Dick99999 » Fri Sep 17, 2010 6:33 am

As of yesterday I get a small message box (like syntax errors). It has Macro Scheduler in the top blue band, a red cross and the text "Connection Closed Gracefully" There is also an FTP status window open with the text "Disconnected". What does this mean?

And since we are on it, is there any way to catch these errors such as this one but also errors such as syntax error, parsing error etc?

Running MS 12.0.8 on XP

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Fri Sep 17, 2010 8:59 am

Set IGNOREERRORS to 1 and look at the individual return vars, e.g. FTP_RESULT for the FTP functions.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Dick99999
Pro Scripter
Posts: 84
Joined: Thu Nov 27, 2008 10:25 am
Location: Netherlands

Post by Dick99999 » Mon Sep 20, 2010 7:14 am

Thanks, that solves the FTP problem. B.t.w. the error was caused by an account that was switched off. I noticed that IGNOREERRORS works for complex expressions too.

Ignore errors does not solve my 'general' problem of syntax and other errors that might be caused by complex substitutions. Ignoring produces unreliable results. My solution now is leave ignore set to zero and have a watchdog DOS script checking whether my MS script is still running by checking the existence of a hart beat signal file.

What I am really looking for is something like a global 'on error call subroutine' or another solution like a 'has there been an error' variable. It would be great, if that a subroutine solution could 'call' a debug breakpoint too.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts