Feature: Extra arg detection
- Commands that do not accept filters or modifications now generate an error when extra arguments are specified.
This commit is contained in:
@@ -71,6 +71,11 @@ int CmdUDAs::execute (std::string& output)
|
||||
std::vector <Task> filtered;
|
||||
filter.subset (filtered);
|
||||
|
||||
if (filter.hasFilter ())
|
||||
throw std::string (STRING_ERROR_NO_FILTER);
|
||||
if (filter.hasModifications ())
|
||||
throw std::string (STRING_ERROR_NO_MODS);
|
||||
|
||||
if (udas.size ())
|
||||
{
|
||||
std::sort (udas.begin (), udas.end ());
|
||||
|
||||
Reference in New Issue
Block a user