ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@bost.de>
Subject [PATCH] Catch some more exceptions when JAXP is not present
Date Wed, 31 May 2000 12:55:40 GMT
 EM> I was cleaning up my classpath ( i.e. setting it over :)), and
 EM> noticed that if you don't have the SAX parser.jar in your class
 EM> path you get NullPointerException instead of a
 EM> NoClassDefFoundError.

This seems to depend on the JDK, on Linux (Blackdown's 1.2.2RC4) I get
the NoClassDefFoundError in either case - but this one remains
uncaught.

The appended patch catches the NoClassDefFoundError as well as
NullPointerException and emits a more meaningful error message. BTW
the NoClassDefFoundError results from the ClassLoader loading
ProjectHelper not from the Class.forName in the try block.

I had to patch BuildException to accept Errors as well as Exceptions
as cause.

Stefan


Mime
View raw message