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 Stefan Naewe <st...@dbs.de> on 2001/03/12 08:43:50 UTC

Probs. with exception

Hi,

I'm using Xerces-C 1.4 (from CVS) with WinNT4.0 and M$ Visual C++ 6.0.
The problem I have is that I don't seem to get exceptions to work. For 
example when I want to parse an XML file that has an illegal 'encoding'
(e.g. encoding='iso-8759-1') and run my program under the debugger, I
can see that an excpetion gets throws by the XMLReader class in method
setEncoding() and in the output window of the debugger I see s'thing 
like: 

First-chance exception in MyDemo.exe (KERNEL32.DLL): 0xE06D7363: \
Microsoft C++ Exception.

but I can't catch the exception. When I change the settings in 
'Debug->Exceptions' for "0xE06d7363 MS C++ Exception" to "Stop always" 
I can step into the code that threw the exception, but catching it 
doesn't work.
I also tried different compiler settings without any luck.

Any ideas ?

TIA

Stefan
-- 
--------------------------------------------------------------------
Stefan Naewe                                  English, German spoken
                                     s.naewe@eu.theimagingsource.com
The Imaging Source Europe GmbH       http://www.theimagingsource.com
Tel: +49-(0)421-33591-0              Fax: +49-(0)421-33591-80
--------------------------------------------------------------------

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


Re: Probs. with exception

Posted by Stefan Naewe <s....@eu.theimagingsource.com>.
Dean Roddey wrote:
> 
> Except for a couple of pathological circumstances, the parser never throws
> out of the parse() call. You should install an error handler. Look at any of
> the sample programs.

Having an invalid 'encoding=' in a PI is such a 'pathological circumstance',
isn't it ?.
The samples (e.g. DOMCount) don't catch the 'TranscodingException'
either.
So, is there anyone else having troubles with those exceptions ?

TIA

Stefan
-- 
--------------------------------------------------------------------
Stefan Naewe                                  English, German spoken
                                     s.naewe@eu.theimagingsource.com
The Imaging Source Europe GmbH       http://www.theimagingsource.com
Tel: +49-(0)421-33591-0              Fax: +49-(0)421-33591-80
--------------------------------------------------------------------

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


Re: Probs. with exception

Posted by Dean Roddey <dr...@charmedquark.com>.
Except for a couple of pathological circumstances, the parser never throws
out of the parse() call. You should install an error handler. Look at any of
the sample programs.

--------------------------
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: "Stefan Naewe" <st...@dbs.de>
To: "Xerces-C-Dev" <xe...@xml.apache.org>
Sent: Sunday, March 11, 2001 11:43 PM
Subject: Probs. with exception


> Hi,
>
> I'm using Xerces-C 1.4 (from CVS) with WinNT4.0 and M$ Visual C++ 6.0.
> The problem I have is that I don't seem to get exceptions to work. For
> example when I want to parse an XML file that has an illegal 'encoding'
> (e.g. encoding='iso-8759-1') and run my program under the debugger, I
> can see that an excpetion gets throws by the XMLReader class in method
> setEncoding() and in the output window of the debugger I see s'thing
> like:
>
> First-chance exception in MyDemo.exe (KERNEL32.DLL): 0xE06D7363: \
> Microsoft C++ Exception.
>
> but I can't catch the exception. When I change the settings in
> 'Debug->Exceptions' for "0xE06d7363 MS C++ Exception" to "Stop always"
> I can step into the code that threw the exception, but catching it
> doesn't work.
> I also tried different compiler settings without any luck.
>
> Any ideas ?
>
> TIA
>
> Stefan
> --
> --------------------------------------------------------------------
> Stefan Naewe                                  English, German spoken
>                                      s.naewe@eu.theimagingsource.com
> The Imaging Source Europe GmbH       http://www.theimagingsource.com
> Tel: +49-(0)421-33591-0              Fax: +49-(0)421-33591-80
> --------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> 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