From 60a428443ebb54b0bd3e4e659c4934fa51496bcc Mon Sep 17 00:00:00 2001 From: Nick Bolton Date: Tue, 1 Jun 2010 21:52:26 +0000 Subject: [PATCH] Tidied up exit (return code instead of printing ugly message) --- lib/synergy/CApp.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/synergy/CApp.cpp b/lib/synergy/CApp.cpp index 6b03c303..e3cdb9a1 100644 --- a/lib/synergy/CApp.cpp +++ b/lib/synergy/CApp.cpp @@ -239,7 +239,10 @@ CApp::run(int argc, char** argv, CreateTaskBarReceiverFunc createTaskBarReceiver result = ARCH->run(argc, argv, createTaskBarReceiver); } catch (XExitApp& e) { - LOG((CLOG_WARN "Forced exit: %s\n", e.what())); + // instead of showing a nasty error, just exit with the error code. + // not sure if i like this behaviour, but it's probably better than + // using the exit(int) function! + result = e.getCode(); } catch (XBase& e) { LOG((CLOG_CRIT "Exception: %s\n", e.what()));