You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by vi...@lightningcast.com on 2003/04/09 21:17:01 UTC

AbstractDOMParser::parse

Something probably incorrect with this code. My internet connection is acting funny so I am unable to track the original coder. And I dont want to abuse bugzilla by filing bugs that may be non-existant...

void AbstractDOMParser::parse(const char* const systemId)
{
    // Avoid multiple entrance
    if (fParseInProgress)
        ThrowXML(IOException, XMLExcepts::Gen_ParseInProgress);

    try
    {
        fParseInProgress = true;
        fScanner->scanDocument(systemId);
        fParseInProgress = false;
    }

    catch(...)
    {
        fParseInProgress = false;
        throw;
    }
}

If parse is invoked when a parse session is still in progress, this code throws an exception. fine, but then it sets the fParseInProgress flag to false again. So, if the parse is still in progress, and another call to parse is made, then why is that not an error ?

Time			Action		Result
--------------------------------------------------------------------------
t1			Parse(x)		Parsing
t10			Parse(y)		Exception, Parse(x) still in progress
t11			Parse(y)		?? Parse(x) is still in progress


-Vinayak

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org