directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Faiz <n...@atlassian.com>
Subject Re: [OT] How best to respond to null arguments?
Date Fri, 02 Sep 2005 07:35:07 GMT
Niclas,

The messageFormat bit is nice for i18n. It's definitely a good idea to 
offer a util which can standardize validation. The final exception would 
be a lot cleaner than a typical NPE.

In general, I'm a little cautious about using static behaviours but it 
seems to work in this context - they can be hard to work around in 
tests. I dont think this would be the case with your 
NullArgumentException.validate(..).

Cheers,
Nick


Niclas Hedhman wrote:
> On Friday 02 September 2005 07:36, Nick Faiz wrote:
> 
>>I've always thought that end users see too many stack-traces  
>>and that applications don't really gain by throwing away exception  
>>information.
> 
> 
> Totally agree.
> 
> See http://issues.apache.org/jira/browse/DIR-113 where I have created 
> something that works along these lines.
> 
> 
> Cheers
> Niclas
> 


-- 
ATLASSIAN - http://www.atlassian.com/

Confluence - the enterprise wiki - tried it yet?
http://www.atlassian.com/confluence/
--

Mime
View raw message