bug#68624: [PATCH] Decode errno for encoding errors.

Felix Lechner via "Bug reports for GUILE, GNU's Ubiquitous Extension Language" <[email protected]>
Newsgroups gmane.lisp.guile.bugs
Message-ID <[email protected]>
* libguile/strings.c (scm_encoding_error): Decode errno.
---

Hi,

Even experienced users do not memorize errno values. [1][2] Why not
decode them as a courtesy?

Kind regards
Felix Lechner

[1] https://debbugs.gnu.org/62590
[2] https://debbugs.gnu.org/59510

libguile/strings.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libguile/strings.c b/libguile/strings.c
index 5eebb3300..ba69bd65e 100644
--- a/libguile/strings.c
+++ b/libguile/strings.c
@@ -1468,7 +1468,7 @@ scm_encoding_error (const char *subr, int err, const char *message,
   scm_throw (scm_encoding_error_key,
 	     scm_list_n (scm_from_latin1_string (subr),
 			 scm_from_latin1_string (message),
-			 scm_from_int (err),
+			 scm_strerror (err),
 			 port, chr,
 			 SCM_UNDEFINED));
 }

base-commit: d8df317bafcdd9fcfebb636433c4871f2fab28b2
-- 
2.41.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.