Page 1 of 1

Dealing with script failures

Posted: Thu Sep 07, 2006 10:21 am
by markd
I'm running the weather script (well, a short version) and every once in a while I get an error- looks like a bad page, maybe, from weather channel.
This causes a popup on the Housebot server, which effectively hangs the script from re-running until I close the box.

Is there any way around this? Some way to tell it not to pop up boxes? I don't really care if it bombs once. . . I'm also running a script to grab traffic data, and that webpage is much squirrlier. I get all kinds of wacky errors from it when they mess up the page.. I managed to add some error checking, but it is hard to imagine all the issues they can cause. ;-)

Markd

Posted: Thu Sep 07, 2006 11:12 am
by Richard Naninck
Do you have the next line set in your script?

On Error Resume Next

You may also want to kill the standard windows error messages:

Go to My Computer and right click for properties then go to advanced. In the lower right hand corner you will find a button that pops another window in which you can set some stuff about error reporting.

Posted: Thu Sep 07, 2006 12:37 pm
by markd
Thanks Richard! I don't think either has been done.

Posted: Thu Sep 07, 2006 12:40 pm
by Richard Naninck
The first one will prevent your script from exiting when an error occurs unless of course you have some kind of syntax problems.

The second one prevents error windows for instance when HouseBot itself would hang hard. Without such a window you can have HouseBot restart from a DOS script without having to acknowledge the error window first.

The first one will probably be your solution.

Good luck..

Posted: Fri Sep 08, 2006 7:26 pm
by loo_hoo_ser
The second tip that you provided (turning off error reporting) is a GREAT tip! I had no idea that was there! Now I can turn off all those error messages whenever my programs crash. Sometimes Housebot does crash ungracefully and causes the MS error reporting dialog box to pop up which prevents my script from restarting HB.

Thanks!

Posted: Sun Sep 10, 2006 10:08 am
by markd
I had done step two already, but step one seems to have cleared up my issue.

Thanks Richard!

Markd