[Nickle]break/continue/return from catch block

Bart Massey nickle@nickle.org
Sat, 20 Jul 2002 23:25:54 -0700


Cool: thanks for the fix.

If I understand you correctly (not sure) you made break and
continue break out of or repeat the catch block itself.  In
any case, IMHO it should break out of or continue the
surrounding loop, i.e.

	while (1) {
	      try f(); catch e() { break; }
	}

should exit the while loop...

	Bart

In message <E17Vzbe-0004PJ-00@localhost> you wrote:
> 
> The question was the proper interpretation of:
> 
> 	exception e (int i);
> 
> 	int f ()
> 	{
> 	    try
> 	    {
> 		raise e (7);
> 	    }
> 	    catch e (int i)
> 	    {
> 		return 12;	/* where does this go? */
> 	    }
> 	    return 3;
> 	}
> 
> 
> The right answer is to return from 'f', but the catch block is implemented 
> internally as a lambda.  I've fixed this as well as fixing 'break' and 
> 'continue' in the same context.  Break/continue jump to the appropriate 
> enclosing loop construct.
> 
> Continuations are good.
> 
> Keith Packard        XFree86 Core Team        HP Cambridge Research Lab
> 
> 
> 
> _______________________________________________
> Nickle mailing list
> Nickle@nickle.org
> http://nickle.org/mailman/listinfo/nickle