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

[REBOL] Re: Help me, Obi Reb Kenobi, you're my only hope!

From: lmecir:mbox:vol:cz at: 1-Sep-2002 20:28

Hi again, LM> The difference is, that in this case the result of the (first block2) LM> expression evaluation "legally" exists, that is why I call it a "legal" LM> error. <<Gabriele>> I see. I'd more likely have errors as first class, instead of a DEFAULT function able to make the distinction. Anyway, it is possible to discern the two cases with:
>> is-really-error?: func [code] [error? try compose [error? (code)]] >> is-really-error? [first block]
== true
>> is-really-error? [first block2]
== false I haven't tried it with any other case tough. <</Gabriele>> It looks to me, that the "first class error" and the "legal vs. illegal error" distinction are two sides of the same coin. Your IS-REALLY-ERROR? function works for simple code like above, but, AFAIK, we cannot handle all possible cases, like e.g.: is-really-error? [1 first block2] ; == true (until errors will be "first class"). Ciao -L