Actually, I do understand major pros and cons of using exceptions. And I use them in my projects by default as error-handling strategy. But now I'm starting a Windows CE project with Qt library, and I see that Qt creators refused to use exceptions in the class hierarchy.
So, if I use exceptions I will need to carefully translate them to and from error codes (or some objects, or just swallow) on my/Qt code bounds. Otherwise, I can refuse to use exceptions in my code and switch to some other strategy.
What would be the best error handling strategy in my case - to use exceptions or to use error-codes, or etc...? Do you have experience with Qt development and what error handling strategy did you use?
Throwing exceptions out of an event handler is not supported in Qt. Avoid that, and there should not be any problem with exceptions.
Override QApplication::notify() and handle exceptions there (not 100% on the return value). You can "throw" exceptions from signal handlers but they don't get propagated to Qt in this way.