groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 08/15: [troff]: Clarify `break`/`continue` diagnostics.


From: G. Branden Robinson
Subject: [groff] 08/15: [troff]: Clarify `break`/`continue` diagnostics.
Date: Thu, 12 Oct 2023 21:55:07 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit e6ad57a613122825dbde6c187197b62b54f96b0f
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sat Oct 7 19:03:56 2023 -0500

    [troff]: Clarify `break`/`continue` diagnostics.
    
    * src/roff/troff/input.cpp (while_break_request)
      (while_continue_request): Clarify diagnostic messages.
---
 ChangeLog                | 5 +++++
 src/roff/troff/input.cpp | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 23a877403..c91c0bec7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-10-07  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * src/roff/troff/input.cpp (while_break_request)
+       (while_continue_request): Clarify diagnostic messages.
+
 2023-10-07  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        [troff]: Trivially refactor.  Rename and boolify some file-local
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index f34dca070..746d456f2 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -6118,7 +6118,7 @@ void while_request()
 void while_break_request()
 {
   if (!while_depth) {
-    error("no while loop");
+    error("cannot 'break' when not in a 'while' loop");
     skip_line();
   }
   else {
@@ -6132,7 +6132,7 @@ void while_break_request()
 void while_continue_request()
 {
   if (!while_depth) {
-    error("no while loop");
+    error("cannot 'continue' when not in a 'while' loop");
     skip_line();
   }
   else {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]