This is the mail archive of the
cygwin
mailing list for the Cygwin project.
R: Exception handling: cannot correctly catch the exception
- From: Marco Atzeri <marco_atzeri at yahoo dot it>
- To: cygwin at cygwin dot com, Dmitry Katsubo <dma_k at mail dot ru>
- Date: Wed, 30 Jun 2010 13:22:45 +0000 (GMT)
- Subject: R: Exception handling: cannot correctly catch the exception
--- Mer 30/6/10, Marco Atzeri ha scritto:
> --- Mer 30/6/10, Dmitry Katsubo?
> ha scritto:
>
> > Dear CygWin users & developers!
> >
> > Please, give me a hint, how to deal with the
> following
> > problem
> > correctly. I have some code, that calls
> GraphicsMagick
> > function and I
> > want to catch the exception thrown. Unfortunately,
> this
> > does not happen,
> > when I compile the code with CygWin:
> >
> > C:\test\bugs\cygwin_exception_test>
> > cygwin_exception_test.exe
> > terminate called after throwing an instance of
> > 'Magick::ErrorFileOpen'
> > ? what():? Magick: Unable to open file (aaaa)
> > reported by
> >
> /pub/cygports/graphicksmagick/GraphicsMagick-1.3.7-2/src/GraphicsMagick-1.3.7/magick/constitute.c:8268
> > (ReadImage)
> > ? ? ? 1 [sig] cygwin_exception_test 9488
> > open_stackdumpfile: Dumping
> > stack trace to cygwin_exception_test.exe.stackdump
> >
> > For Debian it works as expected:
> >
> > root@debian:~/test/bugs/cygwin_exception_test#
> > ./cygwin_exception_test
> > Cannot open file 'aaaa'
> >
> > Or is it a GCC-specific problem? Any workarounds?
> >
> > Additional information:
> > * Cygwin setup v2.697, gcc-g++-3.4.4-999,
> > libGraphicsMagick3-1.3.7-2
> > * Debian squeeze, gcc-4.4.4-5,
> > libgraphicsmagick++3-1.3.12-1
>
>
> GraphicsMagick is built with gcc-4,
> so you should test gcc-4 and not gcc-3.
> Gcc-3 dosn't work with C++ exception
using g++-4 and latest libGraphicsMagick3-1.3.12-1
$ ./cygwin_exception_test.exe
Cannot open file 'aaaa'
So it is really only a problem of the right compiler
>
> >
> > --
> > With best regards,
> > Dmitry
>
> Regards
> Marco
>
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple