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:
@@ -270,9 +270,17 @@ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
|||||||
|
|
||||||
void MyFrame::OnDialog(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))
|
void MyFrame::OnThrowString(wxCommandEvent& WXUNUSED(event))
|
||||||
|
Reference in New Issue
Block a user