groff-commit
[Top][All Lists]
Advanced

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

[groff] 13/30: [grops]: Improve diagnostic.


From: G. Branden Robinson
Subject: [groff] 13/30: [grops]: Improve diagnostic.
Date: Sat, 12 Oct 2024 12:07:52 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit a077a7abfaee8b075fe87b48c27ac54746a1a38f
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri Oct 11 10:59:15 2024 -0500

    [grops]: Improve diagnostic.
    
    * src/devices/grops/psrm.cpp (read_uint_arg): When complaining of
      invalid input (that we expect to be an ISO 646-encoded decimal
      integer), disclose what that input is.
---
 ChangeLog                  | 6 ++++++
 src/devices/grops/psrm.cpp | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 22eee91ee..d8f7f44dc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-10-11  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * src/devices/grops/psrm.cpp (read_uint_arg): When complaining
+       of invalid input (that we expect to be an ISO 646-encoded
+       decimal integer), disclose what that input is.
+
 2024-10-11  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * src/devices/grops/psrm.cpp (read_uint_arg): Boolify.
diff --git a/src/devices/grops/psrm.cpp b/src/devices/grops/psrm.cpp
index c5368f70e..dcd061824 100644
--- a/src/devices/grops/psrm.cpp
+++ b/src/devices/grops/psrm.cpp
@@ -90,7 +90,7 @@ static bool read_uint_arg(const char **pp, unsigned *res)
   const char *start = *pp;
   unsigned long n = strtoul(start, (char **)pp, 10);
   if (*pp == start) {
-    error("not an integer");
+    error("not an integer: '%1'", *pp);
     return false;
   }
   *res = unsigned(n);



reply via email to

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