From: Vadim Zeitlin Date: Wed, 17 Sep 2003 23:36:07 +0000 (+0000) Subject: call wxApp::OnUnhandledException() X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/fb3e83b60a5eeb499bb2934ce4fa0f0cdff5fbec?ds=inline call wxApp::OnUnhandledException() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/init.cpp b/src/common/init.cpp index 2fd5771f04..774cbd2273 100644 --- a/src/common/init.cpp +++ b/src/common/init.cpp @@ -35,6 +35,7 @@ #include "wx/ptr_scpd.h" #include "wx/module.h" +#include "wx/except.h" #if defined(__WXMSW__) && defined(__WXDEBUG__) #include "wx/msw/msvcrt.h" @@ -393,20 +394,24 @@ int wxEntryReal(int& argc, wxChar **argv) WX_SUPPRESS_UNUSED_WARN(cleanupOnExit); - // app initialization - if ( !wxTheApp->CallOnInit() ) + wxTRY { - // don't call OnExit() if OnInit() failed - return -1; - } + // app initialization + if ( !wxTheApp->CallOnInit() ) + { + // don't call OnExit() if OnInit() failed + return -1; + } - // app execution - int retValue = wxTheApp->OnRun(); + // app execution + int retValue = wxTheApp->OnRun(); - // app clean up - wxTheApp->OnExit(); + // app clean up + wxTheApp->OnExit(); - return retValue; + return retValue; + } + wxCATCH_ALL( wxTheApp->OnUnhandledException(); return -1; ) } // wrap real wxEntry in a try-except block to be able to call