cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ugo Cei <u....@cbim.it>
Subject Re: [VOTE] Make ProcessingException extend CascadingRuntimeException
Date Fri, 16 Apr 2004 14:03:29 GMT
Joerg Heinicke wrote:
> 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



Mime
View raw message