Structured Exception handling in Qt
-
Hi! I want to write some
Structured Exceptionhandling in the application to collect user feedback/or free resources safely.__try { // some test code } __except (EXCEPTION_EXECUTE_HANDLER) { qDebug() << "Exception"; }It's working in
Visual Studio, but inQtI get the following error:error: C2712: Cannot use __try in functions that require object unwindingAny ideas how to fix it? Thanks.
-
Use standard
tryandcatch. -
Hi! I want to write some
Structured Exceptionhandling in the application to collect user feedback/or free resources safely.__try { // some test code } __except (EXCEPTION_EXECUTE_HANDLER) { qDebug() << "Exception"; }It's working in
Visual Studio, but inQtI get the following error:error: C2712: Cannot use __try in functions that require object unwindingAny ideas how to fix it? Thanks.
@Cobra91151 It sin't related to Qt, Qt is a framework not a compiler.
See here https://msdn.microsoft.com/en-us/library/xwtb73ad.aspx -
But
tryandcatchonly handles the C++ exceptions notStructured Exception. -
@Cobra91151 It sin't related to Qt, Qt is a framework not a compiler.
See here https://msdn.microsoft.com/en-us/library/xwtb73ad.aspxOk. I will check it. Thanks.