directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Zoerner <ste...@labeo.de>
Subject Re: [OT] How best to respond to null arguments?
Date Wed, 31 Aug 2005 21:11:30 GMT
Alex Burmester wrote:
> There's a psychological aspect to this as well.  I don't know about most 
> folks but whenever I see a NullPointerException from some library I 
> assume that the underlying code is not well written. I never think that 
> I'm possibly doing something wrong even if I am.
> 

That was the first thing I thought. Many users / customers I know think 
of a programming error automatically, if they see an NPE within a stack 
trace or error message. And in most (all?) of the cases it is a 
programming error ;-) Even it is not your fault as an API / framework 
provider ... I didn't do it. Nobody saw me do it. Can't proove anything ;-)

My favorite is the IAE as well, including a descriptive message for the 
caller (API/FW user). Looks more carefully considered in a stack trace 
as well ...

Greetings from Hamburg at night,
Stefan.



Mime
View raw message