- Another strategy is to use exceptions only to signal truly fatal errors. In
- this case you probably don't expect to recover from them and the default
- behaviour -- to simply terminate the program -- may be appropriate. If it is
- not, you may override wxApp::OnUnhandledException()
- in your wxApp-derived class to perform any clean up tasks. Note, however, that
- any information about the exact exception type is lost when this function is
- called, so if you need you should override wxApp::OnRun() and
- add a try/catch clause around the call of the base class version. This would
- allow you to catch any exceptions generated during the execution of the main
- event loop. To deal with the exceptions which may arise during the program
- startup and/or shutdown you should insert try/catch clauses in
- wxApp::OnInit() and/or wxApp::OnExit() as well.
+Another strategy is to use exceptions only to signal truly fatal errors. In
+this case you probably don't expect to recover from them and the default
+behaviour -- to simply terminate the program -- may be appropriate. If it is
+not, you may override wxApp::OnUnhandledException()
+in your wxApp-derived class to perform any clean up tasks. Note, however, that
+any information about the exact exception type is lost when this function is
+called, so if you need you should override wxApp::OnRun() and
+add a try/catch clause around the call of the base class version. This would
+allow you to catch any exceptions generated during the execution of the main
+event loop. To deal with the exceptions which may arise during the program
+startup and/or shutdown you should insert try/catch clauses in
+wxApp::OnInit() and/or wxApp::OnExit() as well.