Again Bloch advocates documenting all exceptions in javadoc including
unchecked exceptions using the @throws tag.




Stephen McConnell <[EMAIL PROTECTED]> on 13/12/2002 15:24:09

Please respond to "Avalon Developers List" <[EMAIL PROTECTED]>

To:    Avalon Developers List <[EMAIL PROTECTED]>
cc:

Subject:    Re: [Avalon4:Fortress] Eating Crow (was Changes to RoleManager)



[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.











****************************************************************
NOTICE - This message is intended only for the use of the 
addressee named above and may contain privileged and 
confidential information.  If you are not the intended recipient
of this message you are hereby notified that you must not 
disseminate, copy or take any action based upon it.  If you 
received this message in error please notify HIC immediately.
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of HIC.
****************************************************************


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

Reply via email to