X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Message-ID: <973873.47092.qm@web25504.mail.ukl.yahoo.com> Date: Wed, 30 Jun 2010 13:22:45 +0000 (GMT) From: Marco Atzeri Subject: R: Exception handling: cannot correctly catch the exception To: cygwin AT cygwin DOT com, Dmitry Katsubo In-Reply-To: <533672.29964.qm@web25505.mail.ukl.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com --- Mer 30/6/10, Marco Atzeri ha scritto: > --- Mer 30/6/10, Dmitry Katsubo=A0 > ha scritto: >=20 > > Dear CygWin users & developers! > >=20 > > 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: > >=20 > > C:\test\bugs\cygwin_exception_test> > > cygwin_exception_test.exe > > terminate called after throwing an instance of > > 'Magick::ErrorFileOpen' > > =A0 what():=A0 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) > > =A0 =A0 =A0 1 [sig] cygwin_exception_test 9488 > > open_stackdumpfile: Dumping > > stack trace to cygwin_exception_test.exe.stackdump > >=20 > > For Debian it works as expected: > >=20 > > root AT debian:~/test/bugs/cygwin_exception_test# > > ./cygwin_exception_test > > Cannot open file 'aaaa' > >=20 > > Or is it a GCC-specific problem? Any workarounds? > >=20 > > 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 >=20 >=20 > GraphicsMagick is built with gcc-4, > so you should test gcc-4 and not gcc-3. > Gcc-3 dosn't work with C++ exception=20 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 >=20 > >=20 > > --=20 > > With best regards, > > Dmitry >=20 > Regards > Marco >=20 -- 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