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: 31-Aug-2002 10:58

Hi all, <<Ed>> ... Personally, I would call it a quirk, but every language has its quirks, why should REBOL be any different. :) <</Ed>> I call it a quirk too and I suggested to straighten the things some time ago. Meanwhile I use my DEFAULT function: default action error-handling The source of the function is: Rebol [ Title: "Default" File: %default.r Author: "Ladislav Mecir" Email: [lmecir--mbox--vol--cz] Reb: reb://Sites/Ladislav Web: Purpose: { An error handling function } Category: [General] ] default: function [ { Try to evaluate code. Evaluate the fault block, if an error occurs } [throw] code [block!] fault [block!] /good pass [block!] ] [result] [ either error? set/any 'result try code [ use [error] compose [ any-type? error: :result do (reduce [fault]) ] ] [ either good [do pass] [get/any 'result] ] ]