X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/532c773634cccf5c19f42aac5d2425ed3e7bb12a..e3f9e20cb15c62bd347a8e52d2d36529adbdb3d6:/samples/except/except.cpp diff --git a/samples/except/except.cpp b/samples/except/except.cpp index 6f8a0acbbe..a7f2d7ad94 100644 --- a/samples/except/except.cpp +++ b/samples/except/except.cpp @@ -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))