Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
None
-
6.6.3
-
None
-
Any build for ARM Mac
Description
Our app has many sanity checks which give a message then throw a C++ exception on failure. The exception is caught in the event loop: code below. It allows users to continue working or at worst save changes then exit on their own.
Code works in Qt 5 for Intel Macs or Windows, and in Qt 6 for Windows. Exception does not reach QApplication::notify on ARM Macs, but terminates immediately. This makes a worse user experience.
In general, users should have control over exception handling on all platforms. Exception throw should mean "get me out of here", not "die suddenly"
Note that signals/slots do not pass exceptions on any platforms. The reported problem happens with ALL exception throws, even if no signal/slot.
bool Our_Application::notify(QObject* receiver, QEvent* event)
{
bool done = true;
try
catch (fatal_exception &fatal)
catch (our_exception &other)
catch (...) // unknown error. Try to continue. Problem may not even be serious
return done;
}