xerces-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bagepalli, Kiran" <kbagepa...@informatica.com>
Subject Error Handling
Date Fri, 07 Feb 2003 02:11:28 GMT
If I need to handle errors or find out if the parsing or loadGrammar failed,
is the errorhandler the only way to find out.

Hence I will have to derive out of ErrorHandler and set a flag once I get an
error. 

Something on the lines of
public MyHandler : public ErrorHandler
{

	//on error set a variable
}

main()
{
  SAX2XMLReader xmlReader;
  MyHandler handler;
  xmlReader.setErrorHandler(&handler);
  xmlReader.loadGrammar(".....");

  if (handler.isInError())
    return; 
  
}

Is this the right way to verify if any errors happened.

Thanks
Kiran


 


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


Mime
View raw message