From 2b772611ffe901b76092d8569fbfdc7e8dde0416 Mon Sep 17 00:00:00 2001 From: Robert Knight Date: Mon, 22 Aug 2011 18:02:51 +0100 Subject: [PATCH] Print details of any exceptions that escape UpdateInstaller::run() --- src/main.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 3e1a77b..51289c9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -20,8 +20,15 @@ void setupUi(UpdateInstaller* installer); void runUpdaterThread(void* arg) { - UpdateInstaller* installer = static_cast(arg); - installer->run(); + try + { + UpdateInstaller* installer = static_cast(arg); + installer->run(); + } + catch (const std::exception& ex) + { + LOG(Error,"Unexpected exception " + std::string(ex.what())); + } } int main(int argc, char** argv)