Re: exception handler

new topic     » goto parent     » topic index » view thread      » older message » newer message

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.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu