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

[REBOL] Re: Coerting Errors to a string?

From: nitsch-lists:netcologne at: 21-Dec-2001 7:56

RE: [REBOL] Re: Coerting Errors to a string? use: if error? lv-err: try [Print "AAA" 'ok] [Print "Error"] if there is no error, try works like do, returning the last value. with if error? lv-err try [1 / 2] [Print "Error"] ; works you return a number, but with if error? lv-err try [Print "AAA"] [Print "Error"] ; does not work you return unset! (the result of a 'print) so return something, i suggest 'ok here, anything goes. or use if error? set/any 'lv-err try [Print "AAA"] [Print "Error"] which works ok with unset! too. -Volker [philb--upnaway--com] wrote: