I'm in a real bind here. I am at the end of a huge project and I found
recently that under some circumstances sax2 throws an XMLErrs::Codes
exception, but it is never caught, even with catch ( ... ) {}, and the
application exits.
As this code must run reliably in a client-server environment, it is
imperative that the application never quit. I must be able to catch the
exception to act accordingly.
Simplified try/catch:
try
{
SAX2PrintHandlers handler(encodingName, unRepFlags, expandNamespaces);
parser->setContentHandler(&handler);
parser->setErrorHandler(&handler);
parser->parse( XMLFile.data() );
}
catch ( const SAXException& toCatch )
{
XMLPlatformUtils::Terminate();
return false;
}
catch ( const XMLException& toCatch )
{
XMLPlatformUtils::Terminate();
return false;
}
catch ( ... )
{
XMLPlatformUtils::Terminate();
return false;
}
The Borland CBuilder 5 debugger sees the exception thrown from somewhere
down in "parser->parse( XMLFile.data() );
Errors I throw myself with SAXException are caught, but the XMLErrs::Codes
is never caught.
Does anyone have any experience with this?
Paul
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]