ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: More meaningfull parser errors (was Re: I want to become an Ant developer)
Date Tue, 04 Apr 2000 13:41:19 GMT
Stefan Bodewig wrote:
> 
> >>>>> "SM" == Stefano Mazzocchi <stefano@apache.org> writes:
> 
>  SM> Stefan Bodewig wrote:
> 
>  >>  checking whether buld.xml is at least well formed and
>  >>  providing better error messages would be helpfull.
> 
>  SM> +1, this is already in the todo list
> 
>  >>  Maybe Xerces would provide more usable error messages and thus >>
>  >>  just switching the parser would help?
> 
>  SM> yes, xerces is much better at error codes than projectX, for what
>  SM> I've seen, but maybe it's a problem with Ant that doesn't print
>  SM> that information passed on the SAXExceptions...
> 
> No, I don't think so. I've downloaded Xerces, hacked together an
> org.apache.tools.ant.Parser implementation for it (anybody
> interested?) and tried the following part (surrounded by a valid
> build file):
> 
>     <javac srcdir="${src.dir}"
>            destdir="${build.classes}"
>            classpath="${classpath}"
> <!--           debug="on" -->
>            deprecation="on"
>            optimize="on" >
> 
> The result using projectX
> 
> BUILD CONFIG ERROR: Can't open config file: buildfail.xml due to:
> org.xml.sax.SAXParseException: com.sun.xml.parser/P-031 <
> 
> followed by a stack trace with no new information. I've also dumped
> out the original stack trace of the SAXParseException, dind't really
> help much.
> 
> The result using Xerces
> 
> BUILD CONFIG ERROR: Can't open config file: buildfail.xml due to: org.xml.sax.SAXParseException:
Element type "javac" must be followed by either attribute specifications, ">" or "/>".
> 
> and the stack trace.
> 
> So yes switching parser does help indeed.

Great!

So +1 to make Xerces the default browser... BTW, ProjectX is now donated
to the ASF so to me it makes perfect sense since it will be integrated
into Xerces anyway :)

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<stefano@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------

Mime
View raw message