Multi-catch/final rethrow

Paul Benedict pbenedict at apache.org
Thu May 6 10:18:26 PDT 2010


Joe,

I was looking at your explanation
>> However, if an Exception is thrown from the try block it should be caught
>> in the "catch(final Exception e)" clause even if the exception is cast to
>> Throwable since catch clauses work based on the runtime class of the
>> exceptions being thrown.

The method is declared to only throw checked exception B. According to
your explanation, the "(Throwable)new Exception()" is caught by "final
Exception e" handler and re-throws -- but it's not of type B.

Isn't this an error?

Paul



More information about the coin-dev mailing list