Re: Exceptions
- Posted by petelomax at blueyonder.co.uk Mar 18, 2002
- 616 views
On Mon, 18 Mar 2002 13:45:10 -0800, 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. > >throw would send a single sequence, which would >travel up the stack to the first 'catch' > >Any comments? > Would it be possible for a normally fatal program error to be converted to a throw, and then be caught? Would you code the catch statement before or after the call? I only mention that as I suspect you might have difficulty finding a catch statement at top level if it is coded after(?). Either way I would expect: catch (sequence s) <statements only executed after thrown exception caught> end catch <processing continues here> Is that about right? Pete