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
Dealing with script failures
-
- HouseBot Guru Extraordinaire
- Posts: 1121
- Joined: Tue Sep 28, 2004 7:49 am
- Location: The Netherlands
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.
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.
-
- HouseBot Guru Extraordinaire
- Posts: 1121
- Joined: Tue Sep 28, 2004 7:49 am
- Location: The Netherlands
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..
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..
-
- Member
- Posts: 83
- Joined: Sat Oct 30, 2004 4:16 pm
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!
Thanks!