What I meant is, if there isn't a DOMErrorHandler, will the parser throw
a DOMException? Or will it throw some other sort of Exception?
Alexander
On Tue, 2004-07-20 at 12:58 -0400, Adam Heinz wrote:
> My own code using a SAXParser checks for a number of errors and makes no assumption
> that I know all of the error classes that could be thrown.
>
> // Parse the XML.
> BOOL bSuccess = FALSE;
> try {
> pParser->parse(pszPath);
> bSuccess = TRUE;
> }
> catch (const XMLException& exception) {
> TCHAR szMessage[_MAX_PATH];
> XStr::getLocal(exception.getMessage(), szMessage, _MAX_PATH);
> m_pLog->Write(exception.getSrcLine(), exception.getSrcFile(),
> szMessage);
> }
> catch (const SAXParseException& exception) {
> TCHAR szFilename[_MAX_PATH], szMessage[_MAX_PATH];
> XStr::getLocal(exception.getSystemId(), szFilename, _MAX_PATH);
> XStr::getLocal(exception.getMessage(), szMessage, _MAX_PATH);
> m_pLog->Write(exception.getLineNumber(), szFilename, szMessage);
> }
> catch (...) {
> m_pLog->Write(ERR_IMPORT_UNKNOWN);
> }
>
> Adam Heinz
> Senior Software Developer
> Exstream Software
>
> -----Original Message-----
> From: Alexander Broekhuis [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 20, 2004 12:44 PM
> To: [EMAIL PROTECTED]
> Subject: RE: LPTSTR to DOMDocument
>
>
> Is that error a DOMException? I allready catch DOM/SAX and XML
> exception. Do I need a DOMErrorHandler to be able to catch a
> DOMException? I will write a DOMErrorHandler, was planning to do, but
> came across this error..
>
> Alexander
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
--
Alexander Broekhuis <[EMAIL PROTECTED]>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]