From c5706ef929640165a7b974a001ae2a27e0e49ecb Mon Sep 17 00:00:00 2001 From: Bernd Weimer Date: Mon, 17 Dec 2018 16:33:32 +0100 Subject: Catch appman exceptions only Only appman exceptions will be caught in main(), all others will be dealt with in the crash handler. This is beneficial, because a backtrace will be printed. Change-Id: I9907e2be8724434d8d052d5f524ab229e7a1c6d5 Reviewed-by: Robert Griebl --- src/tools/appman/appman.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tools/appman/appman.cpp b/src/tools/appman/appman.cpp index 83554ebe..b640cd41 100644 --- a/src/tools/appman/appman.cpp +++ b/src/tools/appman/appman.cpp @@ -52,6 +52,7 @@ # include "sudo.h" #endif #include "startuptimer.h" +#include "exception.h" #if defined(AM_TESTRUNNER) # include "testrunner.h" @@ -118,8 +119,8 @@ Q_DECL_EXPORT int main(int argc, char *argv[]) #else return MainBase::exec(); #endif - } catch (const std::exception &e) { - qCCritical(LogSystem) << "ERROR:" << e.what(); + } catch (const Exception &e) { + qCCritical(LogSystem) << "ERROR:" << e.errorString(); return 2; } } -- cgit v1.2.3