CmdContext: Fix incorrect exception handling

This commit is contained in:
Tomas Babej 2015-02-24 07:31:09 +01:00 committed by Paul Beckingham
parent 0868ba757c
commit e19c99ce1e

View file

@ -148,7 +148,10 @@ int CmdContext::defineContext (std::vector <std::string>& 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 <std::string>& 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;
}