mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
data: Added better error when an attempt is made to track a future interval
This commit is contained in:
parent
60ce6cef25
commit
d87a529d08
1 changed files with 3 additions and 0 deletions
|
@ -213,6 +213,9 @@ Interval getFilter (const CLI& cli)
|
||||||
throw std::string ("Unrecognized date range: '") + join (" ", args) + "'.";
|
throw std::string ("Unrecognized date range: '") + join (" ", args) + "'.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (filter.range.start > now)
|
||||||
|
throw std::string ("Time tracking cannot be set in the future.");
|
||||||
|
|
||||||
if (filter.range.start > filter.range.end)
|
if (filter.range.start > filter.range.end)
|
||||||
throw std::string ("The end of a date range must be after the start.");
|
throw std::string ("The end of a date range must be after the start.");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue