From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Ricardo Wurmus <rekado@elephly.net>
Newsgroups: gmane.lisp.guile.bugs
Subject: bug#60799: Bogus 'Error while printing exception' message when
 raising srfi-35 exception
Date: Sat, 14 Jan 2023 08:25:29 +0100
Message-ID: <87sfgdk1w7.fsf@elephly.net>
References: <87v8l9ewcb.fsf@gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
	logging-data="6511"; mail-complaints-to="usenet@ciao.gmane.io"
User-Agent: mu4e 1.8.13; emacs 28.2
Cc: 60799@debbugs.gnu.org
To: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Sat Jan 14 08:33:30 2023
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 1pGb2e-0001Vu-Eh
	for guile-bugs@m.gmane-mx.org; Sat, 14 Jan 2023 08:33:29 +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 1pGb2F-0002bT-I9; Sat, 14 Jan 2023 02:33:03 -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 1pGb2E-0002b8-If
 for bug-guile@gnu.org; Sat, 14 Jan 2023 02:33:02 -0500
Original-Received: from debbugs.gnu.org ([209.51.188.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 1pGb2E-0007bI-7V
 for bug-guile@gnu.org; Sat, 14 Jan 2023 02:33:02 -0500
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1pGb2E-0008GD-3k
 for bug-guile@gnu.org; Sat, 14 Jan 2023 02:33:02 -0500
X-Loop: help-debbugs@gnu.org
Resent-From: Ricardo Wurmus <rekado@elephly.net>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-guile@gnu.org
Resent-Date: Sat, 14 Jan 2023 07:33:02 +0000
Resent-Message-ID: <handler.60799.B60799.167368152831656@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 60799
X-GNU-PR-Package: guile
X-Debbugs-Original-Cc: 60799@debbugs.gnu.org, bug-guile@gnu.org
Original-Received: via spool by 60799-submit@debbugs.gnu.org id=B60799.167368152831656
 (code B ref 60799); Sat, 14 Jan 2023 07:33:02 +0000
Original-Received: (at 60799) by debbugs.gnu.org; 14 Jan 2023 07:32:08 +0000
Original-Received: from localhost ([127.0.0.1]:53128 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1pGb1M-0008EW-72
 for submit@debbugs.gnu.org; Sat, 14 Jan 2023 02:32:08 -0500
Original-Received: from sender3-of-o58.zoho.com ([136.143.184.58]:21830)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rekado@elephly.net>) id 1pGb1J-0008EO-UY
 for 60799@debbugs.gnu.org; Sat, 14 Jan 2023 02:32:06 -0500
ARC-Seal: i=1; a=rsa-sha256; t=1673681518; cv=none; 
 d=zohomail.com; s=zohoarc; 
 b=ToXThLXY1SrALIhMeI16DzDXxbH4A33Gc+JTZONGVP6AGbODkhWQ3bybhX4CxtPvZMgPPXhlHZBXIrVswukfo5qjjkpYTbvn8L9BMkxMngiJYOOPES6sPpTxzZVD3FmW/y7yNW/hMAMVPyrvYExa3qcDsgQjzXWX7Yjm3JMkEwA=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com;
 s=zohoarc; t=1673681518;
 h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To;
 bh=joMmSfQ9+rLLJAFQNe2swrAn+kQNdH2fwxN+UXtV+sQ=; 
 b=gsSTdRnmIbYQAc7R6Q78OWYyI8i8Hr+97C+hTMnBz/uXhLkeeO4T1rNLaBINzaSYANYekmv1OL6inAe1u/GVq0CS8G5HsuyN2Lcl4GYPULFo98jzJPc+vWb88qJWVXG7oCzYGAsa1u9QqcHGJwyAksO9GfTpx2nq1TWrpK3O1Ok=
ARC-Authentication-Results: i=1; mx.zohomail.com;
 dkim=pass  header.i=elephly.net;
 spf=pass  smtp.mailfrom=rekado@elephly.net;
 dmarc=pass header.from=<rekado@elephly.net>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1673681518; 
 s=zoho; d=elephly.net; i=rekado@elephly.net;
 h=References:From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:In-reply-to:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To;
 bh=joMmSfQ9+rLLJAFQNe2swrAn+kQNdH2fwxN+UXtV+sQ=;
 b=Qx06gtvANwcIxcjAgrrD1Uw2XpD2NO0dQKqA0ZxfwCiP88cTmO2HwUEVsWWMMU5B
 k+mgAG756bSHkrmZU2aJo2qsZGBZb1qug1KLkGsC+Mt5R2VvTAUyfY8eULqy5qx5sh1
 EdCBGnexhdu0ahiwqyXEza5OK+4EI999zvzX7fEI=
Original-Received: from localhost (243-109-142-46.pool.kielnet.net [46.142.109.243]) by
 mx.zohomail.com with SMTPS id 1673681516370140.06185108914838;
 Fri, 13 Jan 2023 23:31:56 -0800 (PST)
In-reply-to: <87v8l9ewcb.fsf@gmail.com>
X-URL: https://elephly.net
X-PGP-Key: https://elephly.net/rekado.pubkey
X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
X-ZohoMailClient: External
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:10515
Archived-At: <http://permalink.gmane.org/gmane.lisp.guile.bugs/10515>


Hi Maxim,

> When raising a srfi-35 defined exception type like in the following, a
> generic (and unhelpful) "Error while printing exception" message is
> shown, with not even the exception type mentioned:
>
> (use-modules (srfi srfi-35))
>
> (define-condition-type &platform-not-found-error &error
>   platform-not-found-error?)
>
> (raise-exception &platform-not-found-error)
>
>
> Produces:
>
> Backtrace:
> In ice-9/boot-9.scm:
>   1752:10  5 (with-exception-handler _ _ #:unwind? _ # _)
> In unknown file:
>            4 (apply-smob/0 #<thunk 7f236157a2e0>)
> In ice-9/boot-9.scm:
>     724:2  3 (call-with-prompt _ _ #<procedure default-prompt-handle=E2=
=80=A6>)
> In ice-9/eval.scm:
>     619:8  2 (_ #(#(#<directory (guile-user) 7f2361580c80>)))
> In ice-9/boot-9.scm:
>    2836:4  1 (save-module-excursion _)
>   4388:12  0 (_)
>
> ice-9/boot-9.scm:4388:12: Error while printing exception.
>
> This is probably not by design, right?

Perhaps not, but conditions are expected to be raised with =E2=80=9Craise=
=E2=80=9D:

--8<---------------cut here---------------start------------->8---
(use-modules (srfi srfi-34) (srfi srfi-35))

(define-condition-type &platform-not-found-error &error
  platform-not-found-error?)

(raise (condition (&platform-not-found-error)))
ice-9/boot-9.scm:1685:16: In procedure raise-exception:
ERROR:
  1. &platform-not-found-error
--8<---------------cut here---------------end--------------->8---

--=20
Ricardo