commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank W. Zammetti" <>
Subject [Digester] Error handler not working
Date Fri, 30 Jun 2006 19:33:31 GMT
Hello... I'm parsing some XML that I am validating against a DTD... I'd
like to be able to stop processing when that validation fails, and I
thought setErrorHandler() would do it, but seemingly not... I have a class
that, with three methods:

public void error(SAXParseException exception)
public void fatalError(SAXParseException exception)
public void warning(SAXParseException exception)

I register it with my Digester instance (before parsing begins) via

I just did a simple exception.printStackTrace() (as well as some println's
to be sure) in each method, and it turns out they are not getting called. 
However, I can see in my logs a SEVERE message stating where the
validation failed from Digester, so it IS validating as expected.

Should this work this way?  Does the error handler you register via
setErrorHandler() not handle DTD validation failures maybe?  Maybe only
parsing errors? (I would expect them to be handled the same, but maybe
not)  Anything else I'm missing?  Thanks!


Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
AIM: fzammetti
Yahoo: fzammetti
Java Web Parts -
Supplying the wheel, so you don't have to reinvent it!

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

View raw message