- Finally, you may also want to continue running even when certain exceptions
- occur. If all of your exceptions may happen only in the event handlers of a
- single class (or only in the classes derived from it), you may centralize your
- exception handling code in wxApp::ProcessEvent
- method of this class. If this is impractical, you may also consider overriding
- the wxApp::HandleEvent() which allows you to handle
- all the exceptions thrown by any event handler.
+Things get more interesting if you decide to let (at least some) exceptions
+escape from the event handler in which they occurred. Such exceptions will be
+caught by wxWidgets and the special wxApp::OnExceptionInMainLoop() method will
+be called from the @c catch clause. This allows you to decide in a single place
+what to do about such exceptions: you may want to handle the exception somehow
+or terminate the program. In this sense, OnExceptionInMainLoop() is equivalent
+to putting a @c try/catch block around the entire @c main() function body in
+the traditional console programs. However notice that, as its name indicates,
+this method won't help you with the exceptions thrown before the main loop is
+started or after it is over, so you may still want to have @c try/catch in your
+overridden wxApp::OnInit() and wxApp::OnExit() methods too, otherwise
+wxApp::OnUnhandledException() will be called.