From ac25d10d741d2e0d9076a29212e2e2a126617acd Mon Sep 17 00:00:00 2001
From: Thomas Goyne <plorkyeran@aegisub.org>
Date: Fri, 7 Mar 2014 08:36:33 -0800
Subject: [PATCH] Eliminate some duplicated exception handling code

---
 aegisub/src/main.cpp | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/aegisub/src/main.cpp b/aegisub/src/main.cpp
index 66ac3ac1d..9b039068a 100644
--- a/aegisub/src/main.cpp
+++ b/aegisub/src/main.cpp
@@ -404,20 +404,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();
 	}
 }
 
-- 
GitLab