[Qt-interest] C++ exceptions don't unwind through QtScript/JS
Eric Miller
ericm at sifteo.com
Tue May 17 19:59:00 CEST 2011
Hey all -
We have some C++ code that uses exceptions. We have a catch block in our QApplication::notify override that will catch anything not caught higher up. However, as we've started calling QObject slots from QtWebKit Javascript and QtScript code, we've discovered that exceptions do not cross the JS/QtScript layers. The app will terminate as if there were no catch block, even though it is in fact still there at the bottom of the stack.
I know Qt is not generally exception-friendly, but is there any good way to deal with this? Converting the C++ exception into a QtScript/JS exception would be ideal, but at least getting the exception to unwind through JS/QtScript would save some trouble.
thanks,
Eric
More information about the Qt-interest-old
mailing list