From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: Attaching context info to an error Date: Fri, 29 Dec 2023 17:39:42 +0000 Message-ID: References: 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="23923"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 29 18:40:52 2023 Return-path: Envelope-to: ged-emacs-devel@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 ) id 1rJGqp-00064L-3u for ged-emacs-devel@m.gmane-mx.org; Fri, 29 Dec 2023 18:40:51 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rJGpz-00037c-HC; Fri, 29 Dec 2023 12:39:59 -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 ) id 1rJGpx-00037E-TX for emacs-devel@gnu.org; Fri, 29 Dec 2023 12:39:57 -0500 Original-Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rJGpw-0004Yy-CT for emacs-devel@gnu.org; Fri, 29 Dec 2023 12:39:57 -0500 Original-Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2ccbded5aa4so45163631fa.1 for ; Fri, 29 Dec 2023 09:39:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703871594; x=1704476394; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=fSeqt5UUFmSDhrfG9MKwGkdPciLl7iiGRr0H2TYKMpI=; b=mq5ROKr03ISp2tiP0+Az+EJ/swfcgmSngP9+jvGNVyAxVC6018n0JmKgISD0CjQnJg ASTe2WrlnSdq8Ww0fsyKWkOJLEVXuz11I7RYRmx9CwrFpQbsB20s2A4zzGtnbO2acgh6 p6LqYL0t5Z98gTVB++PMABkf37PAQqAsWOJ4LJWDE+nj+eWADPpV/90k6baf9hfZyEFZ 86lL/Ifq9+iqoMgMYhCyGT5MHqGbhjGFkEOg/bWnwqn0ofoxaydBcLTNBRkAmMbqd9h9 lQPTUA8W7KUJKlakQ0whUrQbX4o5DRL8NsbdKRkxcJy8gdANdMex5fSH9AcLkT4AI/Y5 fr5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703871594; x=1704476394; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fSeqt5UUFmSDhrfG9MKwGkdPciLl7iiGRr0H2TYKMpI=; b=QkUakkPHDOUKnSl2Fl4EYMIi0viWMWaqfiA5NB0lQLdBvDl9uz6rddoARUNncmXmbs j/B2RSSktAySOTrOR4y7QgKhEXMcYV/dAx/MS+W0VsvUVI7+J+/TMbL58EZdDqVRNzhH n6KRXDkI/N8Ykp2dsmzeGvB8fI1mXpWxt8I//mvyXjnEBhfWMhjUIdzH/wsqi/5Zv9Ki XuNdm8zx8kqckkf9ywdzIVYiep+FHpgXJREjpWCPPEnHy5IRgVLmRxwZLSJmbqPXjy6Q Rr55vJxxnj/96WzdiDfVS0JL51EVKVWXa+4sMCWegg/DF4oevbE6q2uPJv+bsHSB6j2h HOvA== X-Gm-Message-State: AOJu0YxPSyKzuODMQ3wqWYf2e1iDsIJUTJVLk7OOvjSUKEl5HTYIBdLi Mc3oLGG70z9Rjb4f8enoyS0NA/U954aJGA4oyAWrfG3Bs/g= X-Google-Smtp-Source: AGHT+IHHuBiyMF4S6ugJ1FAUFkS3PRkF94X3Tziq6CD2tF/86LUEXd1NmYL2tZqC2+pItxDrh2I2aB6ww9TQ1T5AUfc= X-Received: by 2002:a2e:979a:0:b0:2cc:7127:ebb1 with SMTP id y26-20020a2e979a000000b002cc7127ebb1mr5793709lji.81.1703871594216; Fri, 29 Dec 2023 09:39:54 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::231; envelope-from=joaotavora@gmail.com; helo=mail-lj1-x231.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:314334 Archived-At: On Fri, Dec 29, 2023 at 5:29=E2=80=AFPM Jo=C3=A3o T=C3=A1vora wrote: > > On Fri, Dec 29, 2023 at 4:54=E2=80=AFPM Stefan Monnier wrote: > > > > >> > What object exactly goes into the handler bind handlers? > > >> The same (even `eq`) as the one passed to the `condition-case` handl= er. > > > Would it matter if it weren't? > > > > I think we want to preserve the identity of an error as it > > passes through its various handlers, yes. > > That makes it possible to use `eq` hash tables and to mutate them. > > First, I think that's a bad idea for the reasons I explained > at length. You should "remember" errors via restarts. More precisely, even restarts are not necessary. One should remember errors by not forgetting about them! I.e. use handler-bind. Jo=C3=A3o