Re: [Avalon4:Fortress] Eating Crow (was Changes to RoleManager)
Stephen McConnell <[email protected]>
| Newsgroups | gmane.comp.jakarta.avalon.apps.devel,gmane.comp.jakarta.avalon.devel |
|---|---|
| Message-ID | <[email protected]> |
[email protected] wrote: >In "Effective Java" Joshua Bloch favours the use of standard exceptions >(specifically NullPointerException and IllegalArgumentException) but >(presumably) with sufficient error message details to diagnose the cause. > > > The last point is the real issue - "sufficient error message detail". We are all familiar with the problem of the standard null argument NPE and the pain of tracking it down - however, a properly constructed NPE (typically with the parameter name as the message) is perfectlyb workable and usable. I also think that methods throwing NPE should document this in their javadoc and method signatures. Cheers, Steve. -- Stephen J. McConnell OSM SARL digital products for a global economy mailto:[email protected] http://www.osm.net