forked from mia/Aegisub
Eliminate some duplicated exception handling code
This commit is contained in:
parent
f9498426d8
commit
ac25d10d74
1 changed files with 1 additions and 13 deletions
|
@ -404,20 +404,8 @@ void AegisubApp::HandleEvent(wxEvtHandler *handler, wxEventFunction func, wxEven
|
||||||
try {
|
try {
|
||||||
wxApp::HandleEvent(handler, func, event);
|
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 (...) {
|
catch (...) {
|
||||||
SHOW_EXCEPTION("Unknown error");
|
const_cast<AegisubApp *>(this)->OnExceptionInMainLoop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue