commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Kitching <si...@ecnetwork.co.nz>
Subject Re: [Digester] Why aren't SAXExceptions thrown?
Date Sat, 03 Jul 2004 03:03:22 GMT
On Sat, 2004-07-03 at 09:32, Dan Tarkenton wrote:
> Hello, I'm as confused as possible.  I'm using Digester 1.5 binaries.
>  
> 
> Now, I intentionally try and break my TestResults.xml so that it will
> throw a SAXParseException.  I'm trying to test for this case.  Below
> is part of my log file:
> 
> What gives here?  It certainly is running into a SAXParseException,
> but it doesn't seem to be throwing it. I.e.  i never get a
> TestResultsException.
> 
> Do I need to configure something else?  I looked at the API and I
> thought I had this set to validate against my DTD.  I'm in desparate
> need of help!

Hi Dan,

You probably need to define a class which implements
org.xml.sax.ErrorHandler and pass an instance of your class to the
digester via
  digester.setErrorHander(eh);

Digester extends org.xml.sax.helpers.DefaultHandler, and the default
implementation it inherits from there is to completely ignore errors
reported during parsing.

If you search the email archives, you should find some additional
information on this topic.

Regards,

Simon


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message