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

[REBOL] Re: Trapping an error

From: g:santilli:tiscalinet:it at: 7-Nov-2003 16:46

Hi Steven, On Friday, November 7, 2003, 4:05:09 PM, you wrote: SW> REBOL [ SW> File: %main.r SW> ] SW> HELP-FILENAME: %YYYYY ;;; set default value SW> do %config.r ;;; override default value If you are not interested in what the error is, you can just use: attempt [do %config.r] If you want to know what error happened, etc., you can use something like: if error? set/any 'error try [do %config.r] [ print mold disarm error ] I am using "set/any 'error ..." instead of "error: ..." because the former works even if "do %config.r" does not return anything. Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amiga Group Italia sez. L'Aquila --- SOON: