From 222b6ee0992c2d093957ffbc7f08a3bdece670e5 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 004f21d61..167b20a06 100644
--- a/aegisub/src/main.cpp
+++ b/aegisub/src/main.cpp
@@ -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();
 	}
 }
 
-- 
GitLab