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

[REBOL] write does not return a value upon success. This is bad for try blocks R

From: ryanc:iesco-dms at: 7-Sep-2000 9:57

This method works well...
>> m: error? try [ write %test "test" ]
== false
>> m: error? try [ write test "test" ]
== true This will elleviate the problem with nothing being returned from write...
>> m: try [ write %test "test" none]
== none But you will still have to capture the error...
>> m: try [ write test "test" none]
** Script Error: test has no value. ** Where: write test "test" none I just know how to bottle it up and spit it out later...
>> if error? m: try [ write test "test" none] [ print "error detected!" m ]
error detected! ** Script Error: test has no value. ** Where: write test "test" none Maybe someone knows how to peel an error! apart? --Ryan Life... Dont talk to me about life. -A robot named Marvin [princepawn--lycos--com] wrote: