cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@d-haven.org>
Subject Re: NotImplementedException vs UnsupportedOperationException
Date Fri, 30 Sep 2005 14:04:21 GMT
Reinhard Poetz wrote:

>
> Out of curiousity, is there any special reason not to take the 
> UnsupportedOperationException instead?


Not a major one.  Precedence has already been set in another part of the 
Cocoon code base, so I carried it forward.  There is also a distinction 
between something that is not supported and one that is simply not 
implemented.  In one case you may have a method because the interface 
implemented requires that the method exists, but your implementation is 
never going to support that method--case and point would be a read only 
collection, all write methods would throw 
UnsupportedOperationException.  In this case, we do want to have it as a 
flag that we have some work to do.

So yes, we want to get rid of all NotImplementedExceptions but we want 
to do it by implementing the methods that need implementing.  Using the 
UnsupportedOperationException should be done for methods that will never 
be supported in an implementation.

>
> btw, I really like your exception renaming effort!


Thanks.  Hopefully it pays off with troubleshooting.


Mime
View raw message