These tests are unnecessary now because asserts are almost always enabled. We
could test for wxDEBUG_LEVEL but the code still compiles even if it's defined
as 0 so there doesn't seem to be any need for it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62841
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// catch exceptions which occur in MyFrame methods here
virtual bool ProcessEvent(wxEvent& event);
// catch exceptions which occur in MyFrame methods here
virtual bool ProcessEvent(wxEvent& event);
// show how an assert failure message box looks like
void OnShowAssert(wxCommandEvent& event);
// show how an assert failure message box looks like
void OnShowAssert(wxCommandEvent& event);
private:
// any class wishing to process wxWidgets events must use this macro
private:
// any class wishing to process wxWidgets events must use this macro
#if wxUSE_ON_FATAL_EXCEPTION
Except_HandleCrash,
#endif // wxUSE_ON_FATAL_EXCEPTION
#if wxUSE_ON_FATAL_EXCEPTION
Except_HandleCrash,
#endif // wxUSE_ON_FATAL_EXCEPTION
Except_Dialog,
Except_Quit = wxID_EXIT,
Except_Dialog,
Except_Quit = wxID_EXIT,
#if wxUSE_ON_FATAL_EXCEPTION
EVT_MENU(Except_HandleCrash, MyFrame::OnHandleCrash)
#endif // wxUSE_ON_FATAL_EXCEPTION
#if wxUSE_ON_FATAL_EXCEPTION
EVT_MENU(Except_HandleCrash, MyFrame::OnHandleCrash)
#endif // wxUSE_ON_FATAL_EXCEPTION
EVT_MENU(Except_ShowAssert, MyFrame::OnShowAssert)
EVT_MENU(Except_ShowAssert, MyFrame::OnShowAssert)
END_EVENT_TABLE()
BEGIN_EVENT_TABLE(MyDialog, wxDialog)
END_EVENT_TABLE()
BEGIN_EVENT_TABLE(MyDialog, wxDialog)
menuFile->AppendCheckItem(Except_HandleCrash, wxT("&Handle crashes\tCtrl-H"));
menuFile->AppendSeparator();
#endif // wxUSE_ON_FATAL_EXCEPTION
menuFile->AppendCheckItem(Except_HandleCrash, wxT("&Handle crashes\tCtrl-H"));
menuFile->AppendSeparator();
#endif // wxUSE_ON_FATAL_EXCEPTION
menuFile->Append(Except_ShowAssert, wxT("Provoke &assert failure\tCtrl-A"));
menuFile->AppendSeparator();
menuFile->Append(Except_ShowAssert, wxT("Provoke &assert failure\tCtrl-A"));
menuFile->AppendSeparator();
menuFile->Append(Except_Quit, wxT("E&xit\tCtrl-Q"), wxT("Quit this program"));
wxMenu *helpMenu = new wxMenu;
menuFile->Append(Except_Quit, wxT("E&xit\tCtrl-Q"), wxT("Quit this program"));
wxMenu *helpMenu = new wxMenu;
#endif // wxUSE_ON_FATAL_EXCEPTION
#endif // wxUSE_ON_FATAL_EXCEPTION
void MyFrame::OnShowAssert(wxCommandEvent& WXUNUSED(event))
{
// provoke an assert from wxArrayString
void MyFrame::OnShowAssert(wxCommandEvent& WXUNUSED(event))
{
// provoke an assert from wxArrayString
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{
wxString msg;
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{
wxString msg;