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

[REBOL] Document bug - [catch] There's a catch!

From: al:bri:xtra at: 6-Oct-2000 16:00

Joel wrote:
> > > I assume your [catch] was a faster way of addressing this same
issue, by simply passing the error resulting from an empty argument list back to the caller. Andrew (mistakenly!!) wrote:
> > It's a whole lot simpler and catches the error earlier and it runs
faster. Ladislav wrote:
> I would say, that your source is (as long as :make, :block!, :length?,
:repeat, :foreach, :insert, :tail are normal, unchanged natives) exactly equivalent to the same function not having [catch] refinement, because there is no Throw for it in the source.
>> transpose [[1 2 3] [a b c] 3]
** Script Error: Cannot use path on integer! value. ** Where: insert/only tail Column Row/:Index Ladislav, you're right! I've read the manual on this part, Page 268, 8-26 Function Attributes, and it reads: <quote> If the [catch] attribute is specified, errors that are thrown within the function are caught automatically within the function but (continued on next page) at the point where the function was used. This is useful if you are providing a function library (mezzanine functions) and don't want the error to be displayed within your function, where where it was called: </Quote> But it doesn't mention that this _only_ happens if 'throw is used in the body of the function or one of functions the function might call. I've sent this to feedback and docs @ rebol.com so they can fix it up. Andrew Martin Foolishly believing the documentation! :-) ICQ: 26227169 http://members.nbci.com/AndrewMartin/