[REBOL] Error fuzzy logic
From: ptretter::charter::net at: 26-Aug-2001 8:10
Anyone ever have problems with the error? logic checking. The following for example:
-------------------------------------------------------------
if connected? [
if error? error: try [send [ptretter--charter--net] read %log.txt][error: disarm error]
]
-------------------------------------------------------------
my fix to the problem at this point was to build a function for this process - here is
the complete section of code:
forever [
wait 60
rtime: now/time
if rtime > (ctime + 1:00) [
ctime: now/time
if connected? [if error? error: does [try [send [paul--tretter--charter--net] read %log.txt]][
error: disarm error
save %errorlog.txt mold error ]
]
]
]
Just curious if anyone knows whether there actually is a bug with the Try function or
if its an error with the Error? logic! datatype. The second example when putting 'Try
into a function appears to work. The other one did but would crash often giving the
message that "error has no value".
Paul Tretter