From a51b3d8d7f8fa55bf62cbe9409047df39781b8c2 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Sat, 10 Nov 2012 18:00:30 -0800 Subject: [PATCH] Handle errors which occur in the progress dialog worker thread --- aegisub/src/dialog_progress.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/aegisub/src/dialog_progress.cpp b/aegisub/src/dialog_progress.cpp index 0db73855d..548ce1f02 100644 --- a/aegisub/src/dialog_progress.cpp +++ b/aegisub/src/dialog_progress.cpp @@ -109,7 +109,12 @@ public: } wxThread::ExitCode Entry() { - task(ps); + try { + task(ps); + } + catch (agi::Exception const& e) { + ps->Log(e.GetChainedMessage()); + } wxQueueEvent(dialog, new wxThreadEvent(EVT_COMPLETE)); return 0; }