mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-19 19:03:07 +02:00
CmdContext: Fix incorrect exception handling
This commit is contained in:
parent
0868ba757c
commit
e19c99ce1e
1 changed files with 8 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue