From e19c99ce1e07b2005f2593138725fc08fca92704 Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Tue, 24 Feb 2015 07:31:09 +0100 Subject: [PATCH] CmdContext: Fix incorrect exception handling --- src/commands/CmdContext.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/commands/CmdContext.cpp b/src/commands/CmdContext.cpp index 659f667a0..d65837036 100644 --- a/src/commands/CmdContext.cpp +++ b/src/commands/CmdContext.cpp @@ -148,7 +148,10 @@ int CmdContext::defineContext (std::vector & words, std::stringstre } } else - throw STRING_CMD_CONTEXT_DEF_USAG; + { + out << STRING_CMD_CONTEXT_DEF_USAG << "\n"; + rc = 1; + } return rc; } @@ -188,7 +191,10 @@ int CmdContext::deleteContext (std::vector & words, std::stringstre out << format (STRING_CMD_CONTEXT_DEL_FAIL, words[1]) << "\n"; } else - throw STRING_CMD_CONTEXT_DEL_USAG; + { + out << STRING_CMD_CONTEXT_DEL_USAG << "\n"; + rc = 1; + } return rc; }