[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Attaching context info to an error
From: |
João Távora |
Subject: |
Re: Attaching context info to an error |
Date: |
Fri, 29 Dec 2023 18:48:32 +0000 |
On Fri, Dec 29, 2023 at 6:35 PM Stefan Monnier <monnier@iro.umontreal.ca> 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ão
- Re: Attaching context info to an error, (continued)
- Re: Attaching context info to an error, Alan Mackenzie, 2023/12/29
- Re: Attaching context info to an error, João Távora, 2023/12/29
- Re: Attaching context info to an error, Alan Mackenzie, 2023/12/29
- Re: Attaching context info to an error, João Távora, 2023/12/29
- Re: Attaching context info to an error, Alan Mackenzie, 2023/12/29
- Re: Attaching context info to an error, João Távora, 2023/12/29
- Re: Attaching context info to an error, Stefan Monnier, 2023/12/29
- Re: Attaching context info to an error,
João Távora <=