ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject RE: Misleading error reporting with <import>s
Date Mon, 03 Nov 2003 16:06:41 GMT
> From: Stefan Bodewig []
> On Tue, 21 Oct 2003, Dominique Devienne <> wrote:
> > The error message doesn't specify which build file failed to parse
> > correctly,
> I think it did, as the message must have come from an IOException, so
> the error actually is in recurse.xml not in the file it is trying to
> import.  At least I think so.

No, really Stefan! recurse.xml was doing a <subant> on rescue.xml, and it's
rescue.xml which failed to parse (like I said, because rescue.xml was doing
an entity include of a URI using a custom URL protocol not enabled during
this run. FTR, I was replacing entity include using that protocol with

So Filters.xml was importing recurse.xml
recurse.xml was <subant>'ing rescue.xml
rescue.xml failed to parse because of the entity include (see above)

And *still* the error messages never mentioned that *rescue.xml* failed to
parse, and simply reported on IOException in recurse.xml, never mentioning
as well that recurse.xml was itself imported by Filters.xml.

I don't know what layer is at fault here, but the proper error should have
reported that rescue.xml failed to parse, from <subant> at line XYZ in
recurse.xml, imported from Filters.xml at line ABC.

Without this kind of clear and detailed error report, <import> and
<[sub]ant> will not mix happily!

> > and furthermore, the error is reported to occur in recurse.xml,
> > never mentioning that recurse.xml was in fact imported from
> > build.xml or at which line.
> This is a bit harder to track down and put into the error message, I'm
> afraid.  Currently we don't keep track of that at all AFAICS, we only
> record that a file has been imported, but not from where.

As I said above, I think it's absolutely necessary Ant does this! --DD

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message