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

[REBOL] Re: global error handling?

From: g:santilli:tiscalinet:it at: 25-Jul-2003 10:02

Hi Maxim, On Friday, July 25, 2003, 1:33:42 AM, you wrote: MOA> This has many uses and if its possible I'd like to integrate the mechanism in steel... I think you can't do what you're thinking of. (You'd need continuations, or some way to come back to the point where an exception was raised after it was raised.) If you want to make steel load libraries automatically based on the words a script it using, you could do it in a different way though. As long as all of the script is loaded, you have all of its words in SYSTEM/WORDS. If you QUERY/CLEAR SYSTEM/WORDS *before* loading the script and then QUERY it again after loading it you'll see all the new words present in the script; you can look for them and collect those that are unset.
>> query/clear system/words
== [end! unset! error! datatype! context! native! action! routine! op! function! object! struct! library! p ort! any-type! any-word!...
>> s: load {print "hello" some-library-func print "finished"}
== [print "hello" some-library-func print "finished" ]
>> query system/words
== [s some-library-func]
>> value? 'some-library-func
== false Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amiga Group Italia sez. L'Aquila --- SOON: http://www.rebol.it/