diff options
author | Bernd Weimer <bernd.weimer@pelagicore.com> | 2018-12-17 16:33:32 +0100 |
---|---|---|
committer | Robert Griebl <robert.griebl@pelagicore.com> | 2018-12-18 14:55:32 +0000 |
commit | c5706ef929640165a7b974a001ae2a27e0e49ecb (patch) | |
tree | 66440ce5b808ca4f03c457c3301bc54dcab5dc39 | |
parent | c22911ad00a954849ff66db6e38e488e9a09c5e0 (diff) |
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 <robert.griebl@pelagicore.com>
-rw-r--r-- | src/tools/appman/appman.cpp | 5 |
1 files 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; } } |