[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: capture error stacktrace as sexp?
From: |
Stefan Monnier |
Subject: |
Re: capture error stacktrace as sexp? |
Date: |
Wed, 22 Dec 2021 12:28:53 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Felipe Lema [2021-12-16 15:13:01] wrote:
> Hello, there
>
> Is there a way that, given an `(error ...)` when evaluation some elisp code
> one could capture the whole stacktrace as a sexp?
>
> My intention is to serialize not only the error but the stacktrace of an
> error that occurs in a separate Emacs process so I can re-raise the error in
> /current/ process. You can find more info and context of my intents here:
> https://melpa.org/#/session-async
I don't think you can "re-raise" the error in another session in a way
that preserves the stack trace, since that would mean preserving the
actual whole stack.
But you can get the current stacktrace with `backtrace-frames` so you
can display it in another session.
Stefan