This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Exception handling: cannot correctly catch the exception


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

-- 
With best regards,
Dmitry

Attachment: Makefile
Description: Text document

Attachment: cygwin_exception_test.cpp
Description: Text document

--
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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]