mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-09-02 21:57:19 +02:00
Enhancement
- Output error, header, footnote and debug messages on standard error.
This commit is contained in:
parent
b093d23f1f
commit
b45a305df2
28 changed files with 101 additions and 82 deletions
|
@ -89,7 +89,22 @@ int CmdMerge::execute (std::string& output)
|
|||
else
|
||||
file = uri._path;
|
||||
|
||||
context.tdb2.merge (file);
|
||||
// XXX the following function could indicate whether a modification was
|
||||
// performed without an exception (by returning a boolean, within a status
|
||||
// object or with a specific function)
|
||||
try
|
||||
{
|
||||
context.tdb2.merge (file);
|
||||
}
|
||||
catch (std::string& e) {
|
||||
if (e == STRING_TDB2_UP_TO_DATE)
|
||||
{
|
||||
output += e + "\n";
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
throw e;
|
||||
}
|
||||
|
||||
output += std::string (STRING_CMD_MERGE_COMPLETE) + "\n";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue