[jdom-interest] Re: NoSuch*Exception

Sirtaj Singh Kang ssk at physics.unimelb.EDU.AU
Wed Jun 28 07:45:14 PDT 2000


On Wed, Jun 28, 2000 at 07:54:55AM -0400, Thomas M. Sasala wrote:
> Sirtaj Singh Kang wrote:
> 
> 	If null is returned and it is not checked for,
> then you will get a null pointer exception.  There's your
> error ;)

Not until it is dereferenced. Consider that it might be put into
a database field or a collection. Then the effect of the error is
discovered two or three steps away from where it is actually located,
which is great if you enjoy debugging.

(Please don't forget that this is probably by far the most common source
of runtime errors in programming languages that don't have exceptions.)

-Taj.

Sirtaj S. Kang       taj at kde.org         ssk at physics.unimelb.edu.au
Univ of Melbourne	The "gui" in "Penguin" is pronounced "K-D-E"



More information about the jdom-interest mailing list