Re: Exceptions
- Posted by Kat <gertie at PELL.NET> Mar 19, 2002
- 654 views
On 18 Mar 2002, at 13:45, kbochert at ix.netcom.com wrote: > > I have recently realized that it may be fairly easy to add > exceptions (multilevel returns) to my 'extended' Euphoria. > > procedure foo () > if ... > throw ("Error in FOO ") > end procedure > > procedure foobar () > foo () > ... > end procedure > > procedure zot () > ... > catch s > ?(s & " caught in ZOT") > exit() > end procedure > > throw would send a single sequence, which would > travel up the stack to the first 'catch' > > Any comments? 1a) Great! 1b) Wonderful! 2a) can the catch() in zot() peek at more than one throw()? 2b) will multiple throws be nested s?, in keeping with Euphorian sequences? 2c) will those nested throws be named as to who threw them? Like {{"foo","Error in FOO "}{"foobar","dbz error"}{"zot","it broke"}} 3a) can zot() catch what it is looking for and ignore the rest of the throw()s? 3b) will the ignored throw()s keep passing up to whoever called zot()? Kat