Eliminate some duplicated exception handling code

This commit is contained in:
Thomas Goyne 2014-03-07 08:36:33 -08:00
parent 6bf986a63f
commit 222b6ee099
1 changed files with 1 additions and 13 deletions

View File

@ -400,20 +400,8 @@ void AegisubApp::HandleEvent(wxEvtHandler *handler, wxEventFunction func, wxEven
try {
wxApp::HandleEvent(handler, func, event);
}
catch (const agi::Exception &e) {
SHOW_EXCEPTION(to_wx(e.GetChainedMessage()));
}
catch (const std::exception &e) {
SHOW_EXCEPTION(to_wx(e.what()));
}
catch (const char *e) {
SHOW_EXCEPTION(to_wx(e));
}
catch (const wxString &e) {
SHOW_EXCEPTION(e);
}
catch (...) {
SHOW_EXCEPTION("Unknown error");
const_cast<AegisubApp *>(this)->OnExceptionInMainLoop();
}
}