Re: exception handler
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> Aug 24, 2004
- 457 views
On Tue, 24 Aug 2004 08:48:04 -0700, irv mullins <guest at RapidEuphoria.com> wrote: Why restrict this to types? > >A new keyword, "try", would patch into type()'s failure routine, >and cause execution to resume at the top of the "try" loop. > It should be the *end* of the try block, or some explicit code as in a try/catch/end try statement. This makes it much clearer where to put code to check what failed, eg: try fail=1 open(... fail=2 getc(... fail=3 close(... catch if fail=1 then elsif fail=2 then end try Of course if you use three try blocks, you don't need a fail variable. If you want it to loop, add a loop around the try block(s). Pete PS The above is structured exception handling, and as I said in my other post, Rob should get a simpler final exception handler working first.