Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Stopping errors from stopping the program.

From: micael:gullmes:telenordia:se at: 13-Mar-2002 14:00

Hi! the until command will : "Evaluates a block until it is TRUE." the "prin {ftp failed: trying again ... }" returns true, so the until will stop evaluating your code. I believe the following (non tested) code will work. until [ if error? try [write web-address read page-url] [ prin {ftp failed: trying again ... } false ] ] Brgd /Micael -----Ursprungligt meddelande----- Fran: Dr. Louis A. Turk [mailto:[louisaturk--eudoramail--com]] Skickat: den 13 mars 2002 08:27 Till: [rebol-list--rebol--com] Amne: [REBOL] Stopping errors from stopping the program. Hi rebols, How do I stop an error from stopping my program? I am sending a file to a remote server every 10 minutes to update data. When there is too much traffic on the net or the remote server is too slow receiving the file, an error occurs which results in my program dying. I want it to keep trying until it succeeds no matter how long that takes. Here is what I have tried, but it doesn't seem to work (that is, errors still stop the program): until [not error? try [write web-address read page-url] [prin {ftp failed: trying again ... }]] Louis