I have registered three handlers with expat parser: - start -end - text
And from the main program, I read the xml file, buffer it and invoke XML_Parse API. Something like this:
try {
if( ! XML_Parse (....))
{
// throw user-defined expection here
}
catch(...)
{
}
} // end of try
catch(...)
{
}
If XML_Parse returns 0 on failure, an exception is being thrown from inside if. And it is caught in inner catch block.
Here is my question: If the user-defined exception is thrown from any of the handlers during parsing, will that be caught in the outer catch ?
If yes, its actually not happening in my code. Instead, it is dumping core and stack shows that throw is leading to std:terminate. Do I have to perform anything else before throwing exceptions from HANDLERS.
Thanks.