destroy the frame if the exception occurs in a dialog shown from it

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23744 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2003-09-20 16:23:51 +00:00
parent 7a9dfa3c40
commit df5a063f61

View File

@ -270,9 +270,17 @@ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
void MyFrame::OnDialog(wxCommandEvent& WXUNUSED(event))
{
MyDialog dlg(this);
try
{
MyDialog dlg(this);
dlg.ShowModal();
dlg.ShowModal();
}
catch ( ... )
{
Destroy();
throw;
}
}
void MyFrame::OnThrowString(wxCommandEvent& WXUNUSED(event))