c++ - Qt and error handling strategy -
Actually, I understand the major professionals and ideas to use exceptions. And I use them in my projects as an error-handling strategy by default, but now I'm starting Windows CE project with QE library, and I think that Qt creators would use the exceptions in the class hierarchy Refused.
So, if I use exceptions, I will need to translate it carefully and at the error code (or some object, or just swallow) on my / QT code boundary. Otherwise, I can refuse to use exceptions in my code and switch to another strategy.
To use exceptions or to use error-code, or etc. - what would be the best error management strategy in my case. ..? Do you have experience with Qt development and which error strategy have you used?
Override QApplication :: Notify () and handling exceptions (not at 100% return value) . You can make a "throw" exception from the signal handler, but they do not get publicity in QT like this.
Note bool (QObject * rec, QEvent * ev) {try {return} to QApplication :: (RE, EV); } Hold (mine :: exception & amp; A) {quesoxbox :: warning (0, tr ("an error occurred"), e-mail ()); } Hold (...) {QMessageBox :: Alert (0, tr ("an unexpected error occurred"), tr ("This is probably a bug.")); } return false;
Comments
Post a Comment