The only time an XML exception is exposed is if something goes very wrong
during the very early stages of starting a parse, so that it couldn't even
figure out what its trying to open. Once it gets that far, everything else
should come out as errors via the error handler. You can get exceptions if
you use input sources because they might do some prep work on their own when
the parser starts to use it, and fail in the process of getting themselves
together (such as trying to create the full path in the case at hand here.)
This could probably be moved inside the internal exception handler as well,
but there will always be the possibility that something can go wrong such
that the parser cannot catch it internally, since it could be something that
happens in an implicit conversion on a parameter to a call into the parser.
Another issue with input sources is that you can write your own. The parser
can only deal with error codes it defines. If you write your own input
source, and it throws ids that the parser doesn't understand, its not going
to know what to do, so it might be best to keep those things outside of the
parser's try/catch.
--------------------------
Dean Roddey
The CIDLib C++ Frameworks
Charmed Quark Software
[EMAIL PROTECTED]
http://www.charmedquark.com
"Why put off until tomorrow what you can
put off until the day after tomorrow?"
----- Original Message -----
From: "Jason E. Stewart" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 29, 2001 5:14 PM
Subject: Re: Parse Exceptions vs. fatal errors
> "Jason E. Stewart" <[EMAIL PROTECTED]> writes:
>
> > I ran into a strange problem with some code. Even though I was set
> > an error handler my code was Aborting. I discovered this was because
> > it was actually generating an *exception* and not an *error*.
>
> I've dug through the documentation and I'm not able to find a section
> that describes what constitutes an XMLException (which are not handled
> by ErrorHandler) versus SAXException's (which are).
>
> A pointer as to how to distinguish these would be useful, as I need to
> add code to Xerces-P to properly expose these to Perl.
>
> Thanks,
> jas.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]