[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




--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to