Qt/C++ event loop exception handling -
i having application heavily based on qt , on lot of third party libs. these happen throw exceptions in several cases.
in native qt app causes application abort or terminate. main data model still intact keeping in pure qt no external data.
so thinking recover telling user there has occurred error in process , should save or decide continue working on main model.
currently program silently exits without telling story.
as stated in qt documentation here, qt not exception safe. "recovering exceptions" section on page describes thing can in qt application when exception thrown - clean , exit app.
given using third party libraries throw exceptions, need catch these @ boundary between external library , qt code, , handle them there - stated in caleb's comment. if error must propagated qt application, must done either returning error code (if possible), or posting event.
Comments
Post a Comment