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 Maxim Volkonovsky <ma...@cma.ru> on 2001/04/01 20:00:09 UTC

exceptions in DOMParser

Hello,

Could somebody make clear which exceptions are throwing from
inside of the DOMParser::parse? The DOMPrint sample catches
XMLException although it is intercepted in XMLScanner::scanDocument.
At the same time DOMTreeErrorReporter rethrows SAXException which has
no it's own catch in DOMPrint. When to DOM_DOMException is raised in
real life? Will exceptions ever be raised if I have 'errorHandler'
installed?


Best regards,                           mailto:maxwolf@cma.ru
 Maxim



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


Re: exceptions in DOMParser

Posted by Dean Roddey <dr...@charmedquark.com>.
The only exception that would come out of the parse() method would be
something very catastrophic which would prevent the parser from even getting
going. In some releases there might not be any at all, and in some releases
there might be some that do come out. The deal is that if you get an
exception there, then something fundamental catastrophic has happened. Any
errors which are related to the actual parsing of the XML will come out the
error handler. So you should be prepared to catch exceptions and if you get
them, treat them as basically a very fatal error in the parser's ability to
get itself coherent enough to do anything at all. But you should very, very
rarely get them.

--------------------------
Dean Roddey
The CIDLib C++ Frameworks
Charmed Quark Software
droddey@charmedquark.com
http://www.charmedquark.com

"I'm not sure how I feel about ambivalence"


----- Original Message -----
From: "Maxim Volkonovsky" <ma...@cma.ru>
To: <xe...@xml.apache.org>
Sent: Sunday, April 01, 2001 11:00 AM
Subject: exceptions in DOMParser


> Hello,
>
> Could somebody make clear which exceptions are throwing from
> inside of the DOMParser::parse? The DOMPrint sample catches
> XMLException although it is intercepted in XMLScanner::scanDocument.
> At the same time DOMTreeErrorReporter rethrows SAXException which has
> no it's own catch in DOMPrint. When to DOM_DOMException is raised in
> real life? Will exceptions ever be raised if I have 'errorHandler'
> installed?
>
>
> Best regards,                           mailto:maxwolf@cma.ru
>  Maxim
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>


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