From 38fb2752348fc064a5dcb96835ad2a6a9ddf7d95 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Sat, 22 Feb 2014 02:42:25 +0000 Subject: [PATCH] Fix error message for bad search term within paragraph in c99std/c11std --- PBot/VERSION.pm | 4 ++-- modules/c11std.pl | 6 +++++- modules/c99std.pl | 6 +++++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/PBot/VERSION.pm b/PBot/VERSION.pm index 82d3f34b..0cca2ebb 100644 --- a/PBot/VERSION.pm +++ b/PBot/VERSION.pm @@ -13,8 +13,8 @@ use warnings; # These are set automatically by the build/commit script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 481, - BUILD_DATE => "2014-02-10", + BUILD_REVISION => 482, + BUILD_DATE => "2014-02-21", }; 1; diff --git a/modules/c11std.pl b/modules/c11std.pl index bbc7dfe6..b8d1d67e 100755 --- a/modules/c11std.pl +++ b/modules/c11std.pl @@ -169,7 +169,11 @@ while($text =~ m/^\s{0,4}([0-9A-Z]+\.[0-9\.]*)/msg) { last if $found && $paragraph_specified == $USER_SPECIFIED; if($paragraph_specified == $USER_SPECIFIED) { - print "No such paragraph '$paragraph' in section '$section' of n1570.\n"; + if(length $search) { + print "No such text '$search' in paragraph $paragraph of section $section of n1570.\n"; + } else { + print "No such paragraph $paragraph in section $section of n1570.\n"; + } exit 0; } diff --git a/modules/c99std.pl b/modules/c99std.pl index 1392d67a..65c86b25 100755 --- a/modules/c99std.pl +++ b/modules/c99std.pl @@ -168,7 +168,11 @@ while($text =~ m/^\s{0,4}([0-9A-Z]+\.[0-9\.]*)/msg) { last if $found && $paragraph_specified == $USER_SPECIFIED; if($paragraph_specified == $USER_SPECIFIED) { - print "No such paragraph '$paragraph' in section '$section' of n1256.\n"; + if(length $search) { + print "No such text '$search' found within paragraph $paragraph of section $section of n1256.\n"; + } else { + print "No such paragraph $paragraph in section $section of n1256.\n"; + } exit 0; }