"bearophile" <[email protected]> wrote in message
news:[email protected]...
<SNIP>
My D translation:
import std.stdio;
void main() {
foreach (i; 0 .. 6) {
writeln("Loop: ", i);
try {
try {
if (i == 3)
break;
} finally {
if (i % 2 != 0)
throw new Exception("");
}
} catch (Exception e) {
writeln("Caught");
}
}
}
It prints:
Loop: 0
Loop: 1
Caught
Loop: 2
Loop: 3
And then it crashes.
Bye,
bearophile
Strangely, if you replace the "break" instruction with "continue" (I know
it's pointless code), it also crashes...
Regards, Mike.