From abf4784aba29bc6f7cc21b62c3f86c7b548d6a7f Mon Sep 17 00:00:00 2001 From: Thomas Lauf Date: Wed, 19 Aug 2020 15:02:26 +0200 Subject: [PATCH] Command `start` now hints for command `continue` if called with ids Signed-off-by: Thomas Lauf --- src/commands/CmdStart.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/commands/CmdStart.cpp b/src/commands/CmdStart.cpp index 11956786..9c850c12 100644 --- a/src/commands/CmdStart.cpp +++ b/src/commands/CmdStart.cpp @@ -50,6 +50,13 @@ int CmdStart ( "Perhaps you want the track command?."); } + // We expect no ids + if (! cli.getIds ().empty ()) + { + throw std::string ("The start command does not accept ids. " + "Perhaps you want the continue command?"); + } + journal.startTransaction (); if (validate (cli, rules, database, interval)) {