all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* capture error stacktrace as sexp?
@ 2021-12-16 18:13 Felipe Lema
  2021-12-22 17:28 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Felipe Lema @ 2021-12-16 18:13 UTC (permalink / raw)
  To: emacs-devel

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 

Thanks
Felipe





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: capture error stacktrace as sexp?
  2021-12-16 18:13 capture error stacktrace as sexp? Felipe Lema
@ 2021-12-22 17:28 ` Stefan Monnier
  2021-12-22 17:37   ` Felipe Lema
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2021-12-22 17:28 UTC (permalink / raw)
  To: Felipe Lema; +Cc: emacs-devel

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




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: capture error stacktrace as sexp?
  2021-12-22 17:28 ` Stefan Monnier
@ 2021-12-22 17:37   ` Felipe Lema
  0 siblings, 0 replies; 3+ messages in thread
From: Felipe Lema @ 2021-12-22 17:37 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

On Wednesday, 22 December 2021 14.28.53 -03 Stefan Monnier wrote:
> 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
> 
> 
Thanks for the info,  Stefan... I think this list (which includes the symbols and arguments) should be enough information for user.






^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-12-22 17:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-16 18:13 capture error stacktrace as sexp? Felipe Lema
2021-12-22 17:28 ` Stefan Monnier
2021-12-22 17:37   ` Felipe Lema

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.