gbranden pushed a commit to branch master
in repository groff.
commit a077a7abfaee8b075fe87b48c27ac54746a1a38f
Author: G. Branden Robinson <[email protected]>
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 <[email protected]>
+
+ * 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 <[email protected]>
* 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);
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit