[Nickle]break/continue/return from catch block
Keith Packard
nickle@nickle.org
Sat, 20 Jul 2002 12:09:30 -0700
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