Show error message if command track is called with an id

Closes #439

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
This commit is contained in:
Thomas Lauf 2022-12-29 14:24:37 +01:00
parent 30c69d8e78
commit 3c6caff67b
2 changed files with 8 additions and 0 deletions

View file

@ -6,6 +6,7 @@
(thanks to quazgar)
- #437 Minor AtomicFile cleanup
(thanks to Shaun Ruffel)
- #439 Show error message if command track is called with an id
- #441 Return report return code
(thanks to lospatchos)
- #450 Report 'totals.py' does not display data when no time range specified

View file

@ -39,6 +39,13 @@ int CmdTrack (
auto filter = cli.getFilter ();
// We expect no ids
if (! cli.getIds ().empty ())
{
throw std::string ("The track command does not accept ids. "
"Perhaps you want the continue command?");
}
// If this is not a proper closed interval, then the user is trying to make
// the 'track' command behave like 'start', so delegate to CmdStart.
if (! filter.is_started () ||