commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luc Maisonobe <Luc.Maison...@free.fr>
Subject Re: [Math] Usage of "NullPointerException"
Date Thu, 05 Aug 2010 19:12:19 GMT
Le 05/08/2010 16:26, Phil Steitz a écrit :
> Gilles Sadowski wrote:
>>>> As proposed in
>>>>   https://issues.apache.org/jira/browse/MATH-401
>>>> we could still do explicit checks for "null" but nevertheless throw the
>>>> standard (non-specific and non localized) NPE.
>>>>
>>> The added value that I see is that an IAE designating which argument
>>> that cannot be null is in fact null gives more specific information
>>> to the caller (or production support person examining logs) than
>>> just a propagated NPE.
>>
>> My argument is again "What can he do with that information? Nothing but
>> report the bug to the application developer."
>> Early failure (by explicitly throwing NPE as soon as the problem is
>> detected) to pinpoint the cause is fine, but going beyond that (e.g.
>> using a specific error message for each type found in CM) is not added
>> value; it's bloated code.
> 
> No, it is providing full information on the failure, which is very
> useful when troubleshooting problems during development and
> production.  There is a reason that Java exception classes have a
> "message" property. Developers who construct useful and informative
> exception error messages are doing their users a big favor.  I do
> not want to see us take backward steps in this area.

I second that.

Luc

> 
> Phil
>>
>>
>> Gilles
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message