[Nickle]break/continue/return from catch block
Keith Packard
nickle@nickle.org
Sun, 21 Jul 2002 16:30:10 -0700
Around 23 o'clock on Jul 20, Bart Massey wrote:
> 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...
You agree with Rob Pike and the current implementation as well.
Additional overloading of the 'break' statement is a bad idea, it should
always control the nearest enclosing loop construct.
Keith Packard XFree86 Core Team HP Cambridge Research Lab