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 drkmkzs <dr...@gmail.com> on 2014/03/07 10:24:33 UTC

sax exceptions on Win32

Hello,

I am porting an application from linux to windows 7 32, using xerces 2.8
binaries and MinGW (i'll use xerces 3.x but not for now)

I use xerces / SAX parser to read xml content.

I am experiencing a problem : all exceptions I throw from my SAX Handler
are not catched by caller, my application crash with "terminate called
after throwing exception..."
=> from that method I conclude that the handler throw the exception, but
the caller don't receive it ...

I have tried with my own exceptions, with string exception, with char* ....
 And i'm sure the code is correct, at least that the exception is well
catched, since it is working on Linux (suse/fedora)

So my questions are :
1) Is someone having experience that behaviour yet ?
2) Do I have missed something I should do specifically on windows for
exception to be well treated ?
3) Is there any other method to stop parsing except throwing exception ?

I have found a workaround using a progressive parsing and an error flag,
but I'm looking for performance to, and as I need to check at each
iteration if there is an error, it is not very very efficient :/

Thanks for any help :)