http://bugs.winehq.org/show_bug.cgi?id=23868
Summary: C++: Exception is thrown but application is exited silently Product: Wine Version: 1.1.43 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: nil094@yahoo.com
Created an attachment (id=29969) --> (http://bugs.winehq.org/attachment.cgi?id=29969) exception code
When throwing an exception in C++, the application is supposed to abort, unless the exception had been catched. This is usually done inside blocks (functions, classmethods, etc).
The attached code throws an exception derived from std::runtime_error, causing the application to exit.
when running this on Linux, the output is similar to: terminate called after throwing an instance of 'Exception' what(): some awful error occured Aborted
and the errorcode ($?) is set to "134". However, when compiling the code with mingw and running it with wine, the application exists silently with no visible sign of a thrown exception; the only thing that indicates an error is the variable "$?" which is set to "3".
As I don't think this is expected behaviour, I have reported it as a Bug.
To compile "except.cpp", use this command: wine C:/MinGW/bin/g++.exe except.cpp -o except.exe