Resharpen error message for if command stop gets called with ids

- Amends #270

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
This commit is contained in:
Thomas Lauf 2019-12-27 16:02:02 +01:00
parent 13a8edc7ef
commit 30740af3ba

View file

@ -56,10 +56,12 @@ int CmdStop (
if (! latest.is_open ())
throw std::string ("There is no active time tracking.");
// We either expect no ids, or we're operating on the most current.
// We expect no ids
if (! ids.empty ())
throw std::string ("The stop command works on the most recent open interval. "
{
throw std::string ("The stop command does not accept ids as it works on the most recent open interval only. "
"Perhaps you want the modify command?.");
}
journal.startTransaction ();