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 18:48:32 +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="36288"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Alan Mackenzie , 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 19:49:19 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 1rJHv3-0009AL-He for ged-emacs-devel@m.gmane-mx.org; Fri, 29 Dec 2023 19:49:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rJHuc-0007xu-Rn; Fri, 29 Dec 2023 13:48:50 -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 1rJHuZ-0007xY-PP for emacs-devel@gnu.org; Fri, 29 Dec 2023 13:48:47 -0500 Original-Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rJHuY-0005e3-7m for emacs-devel@gnu.org; Fri, 29 Dec 2023 13:48:47 -0500 Original-Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2ccec6edfa9so8947281fa.1 for ; Fri, 29 Dec 2023 10:48:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703875724; x=1704480524; 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=ZTtKauMAserXfKKweNyX5yd/pZ3bWeAEo8Iv3AqRzGg=; b=FFmeoMiEenUnZDyqiE0x0STaIdSbxSTZCbnlM9jqm5513B2dV4x6q+HGr6c4mCsLV4 gCcu7nczp9iswLQClBAK8xzafyG9ZfvY7ShW4y4zUSQFuxadrP1w//3mSnM1En882Zqk o9eubKtbaRiHdcer76aS+yo4Ipw+pgqQdn/LpCkxpysxur2qFOsExALFlqV5xd61/v3x U5LQgUPJ2MuvkfyT5cgvgdSeB/KxEDD8fV8iRcLbOsY7fHlEeq03q96XoNuWkfihns94 uaqin/1TpCWDUoXhUZFOsiI0SX+nOywjxhdkL5EGZn9OcRkc24VjAM2KMHCW/3Jd8102 f3EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703875724; x=1704480524; 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=ZTtKauMAserXfKKweNyX5yd/pZ3bWeAEo8Iv3AqRzGg=; b=KCcKlDGnIjLm3lrgi409enBlt74/08kZfccxjhISDuSyJGUJv4+uFttNStXS87Is/f XziRfGBkpsJ1o7gI0JlB9UQW4BWV9di7lzP65lHQp8BxX0oO2No7Jc1JU2VdZX06aVP5 yvWP7IfjcF3W2EcKOGuG7gsmj2X+xL97Q3ZEuGCqELxpfW1kwhd0Q6VB4D00ucE2gtND EuAGhkPxvlEDAwr+Yt1JpuL1i53WFut0u9knem0Rw4UMBeOps60lW+6x6MM7JaUqCfcl 4DNfG2Gm5Lnm0JhIrl/JeH+vxhkbgqkqFkn6EXZh3seS/WBEIwhekQgxeqRe+r+JGY9V nm9g== X-Gm-Message-State: AOJu0YyuNZW8F1wNUUnSrYEyEzzWOsatAK2eZYO2sZ67K03Gw5BO7xkw 5To2UZ5i9tHafF7gjxj2MxNvAvc1E36VQK1ycLA= X-Google-Smtp-Source: AGHT+IGzCqB9/disiqeFjxajpf96X0Pn+6Wi7R+9bs5w/rLuC6MT0IvGy5Vgx5u7qxCxnzCb8QkRwCBL4XjEtVmpkrI= X-Received: by 2002:a2e:8709:0:b0:2cc:eae3:1707 with SMTP id m9-20020a2e8709000000b002cceae31707mr1161275lji.21.1703875724288; Fri, 29 Dec 2023 10:48:44 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::22a; envelope-from=joaotavora@gmail.com; helo=mail-lj1-x22a.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:314340 Archived-At: On Fri, Dec 29, 2023 at 6:35=E2=80=AFPM Stefan Monnier wrote: > > > That's got no connection with what I wrote. What I'm asking you to > > confirm is that you're not contemplating introducing error handling > > machinery which, during bootstrap, will only work after Lisp code has > > been loaded. > > The idea is: > > - In the short term, provide new functions that allow manipulating > errors in a way that's independent from their representation > (as cons cells). > Hopefully this will make the code also more readable in many cases. > E.g. (error-resignal ERR) instead of (signal (car ERR) (cdr ERR)). > > - In the longer term once enough code has been adapted to use the new > functions, we may be able to consider changing the representation of > error objects. Presumably error objects would then be changed from > > (list ERROR-TYPE DATA1 DATA2 ...) > > to something like > > (record ERROR-TYPE DATA1 DATA2 ...) > > This shouldn't require anything tricky during bootstrapping. > > But in any case we're pretty damn far from this. I'd estimate that we > have at least 10 years ahead of us to decide if and how we want to > make that change. I concur. And maybe, to keep 100% backward compatibility to current Lisp code, condition-case is AFAIK is the only current to get at error objects from Lisp, would still get the good-ol cons representation for those 10 years, or even forever. Jo=C3=A3o