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

[REBOL] Re: Help me, Obi Reb Kenobi, you're my only hope!

From: ammon:rcslv at: 30-Aug-2002 21:45

Hi, The other suggestions will probably bring you to realise this, but I wanted to make it a little more obvious... When attempting to catch an error and disarm it for your own error handling scheme you will find that using 'set/any is needed rather than a set-word for maximum strength error handling. For example: Use
>> if error set/any fred try [print "done"] [print "Error!"]
Rather than
>> if error fred: try [print "done"] [print "Error!"]
All that try does is catches any error that may be encountered and returns it in as an Error! datatype. 'try doesn't care if a datatype that cannnot be assigned via 'set or a set-word is passed, it will only attempt to 'disarm an error within the argument passed to it. HTH Ammon