avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From david.g...@hic.gov.au
Subject Re: [Avalon4:Fortress] Eating Crow (was Changes to RoleManager)
Date Fri, 13 Dec 2002 04:15:35 GMT

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.

Stephen McConnell <mcconnell@apache.org> on 13/12/2002 14:13:54

Please respond to "Avalon Developers List" <avalon-dev@jakarta.apache.org>

To:    Avalon Developers List <avalon-dev@jakarta.apache.org>

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

Berin Loritsch wrote:

>I am not going to do this anymore, but I will make some
>fundamental changes:
>1) We should *never* explicitly throw a NullPointerException.
>   If an argument is required, throw an IllegalArgumentException
>   instead.  The meaning of the error is much more clear.


If I am expecting a non-null argument, and if the argument is null, I
will throw a NPE with the name of the parameter.  If the argument is not
null but is for some reason invalid, I will throw a



Stephen J. McConnell

digital products for a global economy

To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org

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:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>

View raw message