Ugo Cei <u.cei <at> cbim.it> writes:
catch (ProcessingException e) { getLogger().*(*); throw new *Exception(*, e); }
I'm not very experienced with designing Java class models and even less with checked vs. unchecked exceptions. But the proposal cries IMHO for unforeseen effects like not caught exceptions where they should have been caught.
If all you do is log (maybe) and rethrow, this is a clear indication of the fact that the exception should NOT have been caught in the first place.
And for the specific case of ProcessingExceptions: Does not almost every of our components have the ProcessingException in its throws clause? So where is the need for catching/wrapping/rethrowing them?? Only current bad usage is not a reason for changing it IMO.
The compiler forces you to catch them.
Ugo
