From c7011373136aa4f0d31792cb113c824d880071db Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Sat, 3 Apr 2021 11:23:13 -0400 Subject: [PATCH] CmdContext: Report context as not found if nothing was deleted --- src/commands/CmdContext.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/commands/CmdContext.cpp b/src/commands/CmdContext.cpp index a4688a833..4bb446c33 100644 --- a/src/commands/CmdContext.cpp +++ b/src/commands/CmdContext.cpp @@ -228,6 +228,8 @@ void CmdContext::deleteContext (const std::vector & words, std::str // and 2 (not found) are aceptable return values from unsetConfigVariable if (rc % 2 != 0) throw format ("Context '{1}' not deleted.", words[1]); + else if (rc == 6) + throw format ("Context '{1}' not found.", words[1]); out << format ("Context '{1}' deleted.\n", words[1]); }