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 "Bagepalli, Kiran" <kb...@informatica.com> on 2003/02/07 03:11:28 UTC
Error Handling
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