mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Expression
- Implemented automatic downgrade of arguments to 'word' in the context of modifications.
This commit is contained in:
parent
e08d840ba1
commit
30b5c6c048
1 changed files with 11 additions and 15 deletions
|
@ -1595,21 +1595,17 @@ Arguments Arguments::extract_modifications ()
|
||||||
// Error.
|
// Error.
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (arg->_third == "pattern")
|
// Instead of errors, simply downgrade these to 'word'.
|
||||||
throw std::string ("A pattern '")
|
if (arg->_third == "pattern" ||
|
||||||
+ arg->_first
|
arg->_third == "attmod" ||
|
||||||
+ "' is not allowed when modifiying a task.";
|
arg->_third == "id" ||
|
||||||
|
arg->_third == "uuid")
|
||||||
else if (arg->_third == "attmod")
|
{
|
||||||
throw std::string ("An attribute modifier '")
|
arg->_third = "word";
|
||||||
+ arg->_first
|
modifications.push_back (*arg);
|
||||||
+ "' is not allowed when modifiying a task.";
|
}
|
||||||
|
else
|
||||||
else if (arg->_third == "id")
|
throw std::string ("Error: unrecognized argument in modifications.");
|
||||||
throw std::string ("A task id cannot be modified.");
|
|
||||||
|
|
||||||
else if (arg->_third == "uuid")
|
|
||||||
throw std::string ("A task uuid cannot be modified.");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue