From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Felix Lechner via "Bug reports for GUILE,
 GNU's Ubiquitous Extension Language" <bug-guile@gnu.org>
Newsgroups: gmane.lisp.guile.bugs
Subject: bug#68624: [PATCH] Decode errno for encoding errors.
Date: Sat, 20 Jan 2024 19:38:26 -0800
Message-ID: <20240121034401.17992-2-felix.lechner@lease-up.com>
Reply-To: Felix Lechner <felix.lechner@lease-up.com>
Mime-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
	logging-data="9654"; mail-complaints-to="usenet@ciao.gmane.io"
Cc: Felix Lechner <felix.lechner@lease-up.com>
To: 68624@debbugs.gnu.org
Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Sun Jan 21 04:46:30 2024
Return-path: <bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org>
Envelope-to: guile-bugs@m.gmane-mx.org
Original-Received: from lists.gnu.org ([209.51.188.17])
	by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
	(Exim 4.92)
	(envelope-from <bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org>)
	id 1rROmz-0002MY-NH
	for guile-bugs@m.gmane-mx.org; Sun, 21 Jan 2024 04:46:30 +0100
Original-Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <bug-guile-bounces@gnu.org>)
	id 1rROma-0000go-BB; Sat, 20 Jan 2024 22:46:04 -0500
Original-Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1rROmX-0000gM-Ey
 for bug-guile@gnu.org; Sat, 20 Jan 2024 22:46:02 -0500
Original-Received: from debbugs.gnu.org ([2001:470:142:5::43])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1rROmV-00048p-9z
 for bug-guile@gnu.org; Sat, 20 Jan 2024 22:46:00 -0500
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1rROmY-00083B-1J
 for bug-guile@gnu.org; Sat, 20 Jan 2024 22:46:02 -0500
X-Loop: help-debbugs@gnu.org
Resent-From: Felix Lechner <felix.lechner@lease-up.com>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-guile@gnu.org
Resent-Date: Sun, 21 Jan 2024 03:46:01 +0000
Resent-Message-ID: <handler.68624.B.170580875430929@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: report 68624
X-GNU-PR-Package: guile
X-GNU-PR-Keywords: patch
X-Debbugs-Original-To: bug-guile@gnu.org
Original-Received: via spool by submit@debbugs.gnu.org id=B.170580875430929
 (code B ref -1); Sun, 21 Jan 2024 03:46:01 +0000
Original-Received: (at submit) by debbugs.gnu.org; 21 Jan 2024 03:45:54 +0000
Original-Received: from localhost ([127.0.0.1]:36254 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1rROmP-00082m-N0
 for submit@debbugs.gnu.org; Sat, 20 Jan 2024 22:45:54 -0500
Original-Received: from lists.gnu.org ([2001:470:142::17]:45226)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <felix.lechner@us-core.com>) id 1rROmK-00082S-EC
 for submit@debbugs.gnu.org; Sat, 20 Jan 2024 22:45:52 -0500
Original-Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <felix.lechner@us-core.com>)
 id 1rROmA-0000dY-6A
 for bug-guile@gnu.org; Sat, 20 Jan 2024 22:45:38 -0500
Original-Received: from sail-ipv4.us-core.com ([208.82.101.137])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256)
 (Exim 4.90_1) (envelope-from <felix.lechner@us-core.com>)
 id 1rROm7-00046f-Hb
 for bug-guile@gnu.org; Sat, 20 Jan 2024 22:45:37 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=2017; bh=dZFAygPCV4C454f
 Hi8VCVZTpqXlJHvtPHrawX/Vkhlo=; h=date:subject:cc:to:from;
 d=lease-up.com; b=iziunukq8MkwUZiWcoCwcjH3R0Es5SbywywGNK8+kqQsFnocLqCL
 x/QG6vKVf44p6Us6RhJnAJgbaZn2z/zmtdRjKfq7YcMrqBE/Cv/oTaqN2aDceV2446gVOS
 FKLEF5CJS+0tVh9w9tBKBZDZGZBLToLedaW4IBs4bMMT+kg6Y=
Original-Received: by sail-ipv4.us-core.com (OpenSMTPD) with ESMTPSA id c8d69100
 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); 
 Sun, 21 Jan 2024 03:45:31 +0000 (UTC)
Original-Received: from localhost (localhost [local])
 by localhost (OpenSMTPD) with ESMTPA id 6d86577a;
 Sun, 21 Jan 2024 03:45:30 +0000 (UTC)
X-Mailer: git-send-email 2.41.0
Received-SPF: pass client-ip=208.82.101.137;
 envelope-from=felix.lechner@us-core.com; helo=sail-ipv4.us-core.com
X-Spam_score_int: -17
X-Spam_score: -1.8
X-Spam_bar: -
X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01,
 UNPARSEABLE_RELAY=0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
X-BeenThere: bug-guile@gnu.org
List-Id: "Bug reports for GUILE,
 GNU's Ubiquitous Extension Language" <bug-guile.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-guile>,
 <mailto:bug-guile-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/bug-guile>
List-Post: <mailto:bug-guile@gnu.org>
List-Help: <mailto:bug-guile-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-guile>,
 <mailto:bug-guile-request@gnu.org?subject=subscribe>
Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org
Original-Sender: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org
Xref: news.gmane.io gmane.lisp.guile.bugs:10755
Archived-At: <http://permalink.gmane.org/gmane.lisp.guile.bugs/10755>

* 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