unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#68624: [PATCH] Decode errno for encoding errors.
@ 2024-01-21  3:38 Felix Lechner via Bug reports for GUILE, GNU's Ubiquitous Extension Language
  0 siblings, 0 replies; only message in thread
From: Felix Lechner via Bug reports for GUILE, GNU's Ubiquitous Extension Language @ 2024-01-21  3:38 UTC (permalink / raw)
  To: 68624; +Cc: Felix Lechner

* 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






^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-21  3:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-21  3:38 bug#68624: [PATCH] Decode errno for encoding errors Felix Lechner via Bug reports for GUILE, GNU's Ubiquitous Extension Language

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).