How to handle exceptions on Android?
-
Hi,
we're porting a desktop app to Android, using Qt 5.6.2 and we are making good progress but have run into a problem with Exceptions. In our desktop app we have overridden the QCoreApplication::notify method in a derived Application object to be able to catch and handle exceptions. So if I put a breakpoint anywhere into the code and then look at the call stack, I will always see that our notify method has been called and thus goes through try {} catch() where we can deal with exceptions.
However, when I do the same on Android it seems that QApplication::notify is being called by the event dispatcher, not our implementation...
My question is thus, what is the correct way of doing this on Android?
Thanks for your help,
Andres
-
-
Did I say that it works fine in the x86 emulator but NOT when running on an actual ARM device?
To be precise.. when I am on an x86 AVD and throw an exception in a slot connected to a button clicked() signal my implementation of QApplication::notify() gets called and it handles the exception gracefully. However, when doing the same on a Samsung Galaxy E ARM KitKat 4.4 the application aborts with SIGABRT.