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. 

I've tried catching all of the following, but they all get skipped; only
catch(...) is collecting the mystery exception:
   XMLException
   SAXException 
   OutOfMemory
   IOException
   EndOfEntityException // wild guess
   DOM_DOMException // wild guess
   DOMException     // wild guess
   int, short 

I tried the int/short because I see xerces code sometimes throws enum
constants (??!!) and on occasions even the value 0 (!).

Any ideas what this exception might be, or how I could find out what it
is?

Thanks,

Simon


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

Reply via email to