changed exceptions handling to work under wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34717 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -46,6 +46,7 @@
|
||||
#include "wx/thread.h"
|
||||
#include "wx/utils.h"
|
||||
#include "wx/ptr_scpd.h"
|
||||
#include "wx/evtloop.h"
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include "wx/msw/private.h" // includes windows.h for LOGFONT
|
||||
@@ -467,6 +468,35 @@ void wxAppBase::OnIdle(wxIdleEvent& WXUNUSED(event))
|
||||
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// exception handling
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_EXCEPTIONS
|
||||
|
||||
void wxAppBase::HandleEvent(wxEvtHandler *handler,
|
||||
wxEventFunction func,
|
||||
wxEvent& event) const
|
||||
{
|
||||
// by default, call wxApp::OnExceptionInMainLoop if an exception occurs
|
||||
try
|
||||
{
|
||||
handler->DoHandleEvent(func, event);
|
||||
}
|
||||
catch ( ... )
|
||||
{
|
||||
if ( !wxConstCast(this, wxAppBase)->OnExceptionInMainLoop() )
|
||||
{
|
||||
wxEventLoop *loop = wxEventLoop::GetActive();
|
||||
if ( loop )
|
||||
loop->Exit(-1);
|
||||
}
|
||||
//else: continue running the event loop
|
||||
}
|
||||
}
|
||||
|
||||
#endif // wxUSE_EXCEPTIONS
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxGUIAppTraitsBase
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user