I'm trying to build a test project in Qt Creator, where I want to catch all exceptions in single catch block even without throw.
For example, the following code works in MS Visual Studio without crash, if I set the option C/C++ -> Code Generation -> Enable C++ Exceptions to /EHa:
int a = 100, b = 0, c = 1;
try
{
c = a / b;
}
catch (...)
{
c = 0;
}
But the same code above crashes in Qt Creator (as expected). Is there any QMake flag or option (similar to /EHa option in MS Visual Studio) I can set in Qt .pro file, so that I can avoid crash and catch all exceptions without throw?
Thanks in advance.