[REBOL] Re: Bug of TRY was bug of function error?
From: ammon:rcslv at: 22-Jul-2002 13:37
Hi,
This one only gets stranger:
>> b
== ** Script Error: Out of range or past end
** Where: connect-to-link
** Near: try [b]
anybody notice the == at the top of that? A normal error doesn't do that! Take for
instance my quick typo here:
>> error? try b
** Script Error: try expected block argument of type: block
** Where: connect-to-link
** Near: error? try b
Huh?
Ammon
=== Original Message ===
Hi Romano,
Now that I've had a little more coffee, and Anton go me on track...
>> do b
>> type? do b
== unset!
>> type? try [do b]
== unset!
>> type? try [b]
== string!
>> type? b
== string!
I have no idea why it returns the datatype of the value in this case.
Probably worth a feedback, if only to get clarification (hopefully). It says
that TRY tries to DO the block, but if you just DO the block yourself, you
get the error. Something else has to be going on inside TRY.
Given: b 1 ; == 1
is the error only triggered if the data is accessed in some way (e.g. to
print in the console, assign, etc.)? If the data is not used, no error is
triggered.
--Gregg