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

[REBOL] Newbie getting head around TRY/DISARM

From: mat:eurogamer at: 14-Nov-2000 12:56

Hello folks, I'm new to the list. I've been tinkering with Rebol making some damn handy scripts. Never done anything this productive since the Amiga! Anyhow, I've got a damn nice script that automatically uploads me some game server log files. Unfortunately I'm having trouble trapping errors. The examples given in the official guide basically seem broken to me. For example; if error? bleet: try [ delete xUploadFile ] [ print ["* File locked, skipping..." filen] probe disarm bleet return false ][ Quite straight forward you would have thought. Ripped straight from an example in the official guide. Well, it just doesn't WORK. It blows out claiming that bleet: must have some value. So does bleet get no value if there is no error in the try block? Then why does the official guide have this example;
>> if error? error: try [ 1/0 ] [ [probe disarm error ]
Is this not exactly the same as my form? Previously I had something simply in the format of; if error? try [ delete file ] [ Whine a bit ] But suddenly I was getting zillions of errors when there were no errors (specifically ftp uploading). So I assume I need to disarm it but now I can't get this form to work at all. -- Mat Bettinson - EuroGamer's Gaming Evangelist with a Goatee http://www.eurogamer.net | http://www.eurogamer-network.com