Dealing with script failures

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
markd
Advanced Member
Posts: 234
Joined: Fri Jul 21, 2006 4:32 pm

Dealing with script failures

Post 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
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post 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.
markd
Advanced Member
Posts: 234
Joined: Fri Jul 21, 2006 4:32 pm

Post by markd »

Thanks Richard! I don't think either has been done.
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post 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..
loo_hoo_ser
Member
Posts: 83
Joined: Sat Oct 30, 2004 4:16 pm

Post 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!
markd
Advanced Member
Posts: 234
Joined: Fri Jul 21, 2006 4:32 pm

Post by markd »

I had done step two already, but step one seems to have cleared up my issue.

Thanks Richard!

Markd
Post Reply