cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bertrand Delacretaz <>
Subject Re: [RT] Checked exceptions considered harmful
Date Wed, 14 Apr 2004 14:30:40 GMT
Le 14 avr. 04, à 16:05, Ugo Cei a écrit :

> ...Indeed. That's why I propose that ProcessingException extends 
> CascadingRuntimeException, instead of CascadingException. This way, 
> you won't be forced to catch it (and catch ResourceNotFoundException) 
> if you don't need to and be tempted to wrap it or swallow it....

> ...The litmus test should be the following: can you recover from a 
> ResourceNotFoundException, in the general case? IMHO, no. Your best 
> course of action is to tell the user....

Ok, so we're getting much more specific that your original "use 
unchecked exceptions everywhere" proposal (or my understanding of it), 
aren't we?

IMHO coming up with specific rules about where to use which method 
(unchecked exceptions, throws Exception, throws A,B,C) is much more 
likely to be accepted by the community than general rules.


View raw message