mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
#157: Change error message for non-positive IDs
This commit is contained in:
parent
48aa9cfdc0
commit
616ca4b884
2 changed files with 5 additions and 3 deletions
|
@ -412,9 +412,11 @@ void CLI::identifyIds ()
|
|||
int digits;
|
||||
if (pig.skipLiteral ("@") &&
|
||||
pig.getDigits (digits) &&
|
||||
pig.eos () &&
|
||||
digits > 0)
|
||||
pig.eos ())
|
||||
{
|
||||
if (digits <= 0)
|
||||
throw format ("'@{1}' is not a valid ID.", digits);
|
||||
|
||||
a.tag ("ID");
|
||||
a.attribute ("value", digits);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue