Multi-catch: Explanation of final

Joseph D. Darcy Joe.Darcy at Sun.COM
Tue Nov 24 17:48:25 PST 2009

Paul Benedict wrote:
> I have some difficulty understanding why "final" is necessary in the
> multi-catch proposal. Can anyone help me understand better? I know it
> revolves around limiting the scope of disjunctive types, but it's not
> clear to me.

"final" tells the compiler the catch variable does not change; therefore 
if the value of variable is rethrown, the compiler knows that the set of 
exceptions throwable by the rethrow is exactly the same as the exception 
that could be caught by that block.


More information about the coin-dev mailing list