From 8fa18d0da24682bdb26e25c3439b539ea0189aa4 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 23 May 2011 23:16:01 -0400 Subject: [PATCH] Bug #761 - Fixed bug #761, in which the 'prepend' and 'append' commands failed to generate an error when no text was provided (thanks to Aikido Guy). --- ChangeLog | 2 ++ src/command.cpp | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 32d8a1a3c..92107bc29 100644 --- a/ChangeLog +++ b/ChangeLog @@ -77,6 +77,8 @@ are quoted (thanks to Duane Waddle). + Applied patch for Bug #746, which added missing documentation for the 'entry' report column (thanks to Duane Waddle). + + Fixed bug #761, in which the 'prepend' and 'append' commands failed to + generate an error when no text was provided (thanks to Aikido Guy). + Fixed bug #762, #763, so that modifications to tasks are considered 'write' commands, and therefore update shadow files (thanks to Aikido Guy). + Applied patch for Bug #770, which fixed a broken build (thanks to Christopher diff --git a/src/command.cpp b/src/command.cpp index 3a866738f..85700dc4a 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -1946,6 +1946,9 @@ int handleModify (std::string& outs) //////////////////////////////////////////////////////////////////////////////// int handleAppend (std::string& outs) { + if (!context.task.has ("description")) + throw std::string ("Additional text must be provided."); + int rc = 0; int count = 0; std::stringstream out; @@ -2027,6 +2030,9 @@ int handleAppend (std::string& outs) //////////////////////////////////////////////////////////////////////////////// int handlePrepend (std::string& outs) { + if (!context.task.has ("description")) + throw std::string ("Additional text must be provided."); + int rc = 0; int count = 0; std::stringstream out;