From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Felipe Lema Newsgroups: gmane.emacs.devel Subject: Re: capture error stacktrace as sexp? Date: Wed, 22 Dec 2021 14:37:10 -0300 Message-ID: <16738737.LcY1orlIAo@felipe-thinkpad-x200> References: <5546628.DvuYhMxLoT@felipe-thinkpad-x200> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7264"; 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 Wed Dec 22 18:40:06 2021 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 1n05av-0001gd-BR for ged-emacs-devel@m.gmane-mx.org; Wed, 22 Dec 2021 18:40:05 +0100 Original-Received: from localhost ([::1]:51566 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n05at-0008AE-Bi for ged-emacs-devel@m.gmane-mx.org; Wed, 22 Dec 2021 12:40:03 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:51494) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n05YF-0005kg-AI for emacs-devel@gnu.org; Wed, 22 Dec 2021 12:37:19 -0500 Original-Received: from devianza.investici.org ([198.167.222.108]:47531) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n05YC-0001x0-OS for emacs-devel@gnu.org; Wed, 22 Dec 2021 12:37:18 -0500 Original-Received: from mx2.investici.org (unknown [127.0.0.1]) by devianza.investici.org (Postfix) with ESMTP id 4JK0rV61zgz6vH2; Wed, 22 Dec 2021 17:37:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mortemale.org; s=stigmate; t=1640194634; bh=rNE+1QKj82mvxB7SZT5ZOhIauH+yuaJrspXfoKdxJGk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZIWLVPY6Cz4Y7Bv6IrOlHft7/3hA8xUHUdA4ZAvbR7/5+k+uxdJdzKMMOkrqDHNC9 3VAZqkgc8/9vYQkljS6fq9Jl9YW6DFju9GeF3yom+jdriqzGqFyeRrDplKxiAMDS2p tq0h1jg/qbSeqNYyN6Qpui1vJdJzuJN4OyiWDm2Q= Original-Received: from [198.167.222.108] (mx2.investici.org [198.167.222.108]) (Authenticated sender: felipelema@mortemale.org) by localhost (Postfix) with ESMTPSA id 4JK0rV0q92z6vGy; Wed, 22 Dec 2021 17:37:13 +0000 (UTC) In-Reply-To: Received-SPF: pass client-ip=198.167.222.108; envelope-from=felipelema@mortemale.org; helo=devianza.investici.org 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 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" Xref: news.gmane.io gmane.emacs.devel:282802 Archived-At: 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.