Glenn Linderman wrote:
>
> More seriously, I agree there is no need for a "try" keyword... it just
> starts a block, which could just as well be any other block.
This makes especially good sense if the catch{} is INSIDE the relevant
block, rather than following it.
Because without "try" (or its equivalent), there would be ambiguity
as to what block the second catch below is applying to:
qc/try/ {
might_throw_E1_or_E2();
}
catch E1 {
might_throw_E2();
}
catch E2 {
# where did this E2 come from?
}
But no such ambiguity exists here:
qc/try/ {
might_throw_E1_or_E2();
catch E1 {
might_throw_E2();
}
catch E2 {
# we know exactly where this E2 came from!
}
}
--
John Porter
Aus tiefem Traum bin ich erwacht.