On Fri, 2004-07-16 at 13:44, Simon Kitching wrote:
> Hi,
> 
> I've created a class which implements the EntityResolver interface.
> 
> In the resolveEntity method, I just throw SAXParseException; because I
> don't have a local catalog and don't want to allow network lookups, I
> want to treat any attempt to reference an external entity from the
> parsed xml as an error.
> 
> The documentation for EntityResolver::resolveEntity says that
> SAXException can be thrown.
> 
> However when I parse a document which does attempt an external entity
> reference, my EntityResolver code gets invoked as expected, and the
> SAXParseException gets thrown. This ends up causing *some* kind of
> exception to be thrown from the SAX2XMLReader::parse method, but I can't
> figure out what it is. 

Sorry, issue resolved and it is my fault. 

It's been far too long since I used c++, and I fell into a Java-ism:
  throw new SAXParseException(....)
when it should have been:
  throw SAXParseException(....)

The mystery exception type was therefore: pointer-to-SAXParseException
:-(.

Regards,

Simon



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to