From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#37480: 27.0.50; uncaught exception Date: Sun, 22 Sep 2019 17:50:25 +0300 Message-ID: <838sqgqtam.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="113397"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 37480@debbugs.gnu.org To: Christian Johansson Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 22 16:51:09 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iC3Cf-000TMg-F1 for geb-bug-gnu-emacs@m.gmane.org; Sun, 22 Sep 2019 16:51:09 +0200 Original-Received: from localhost ([::1]:47204 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iC3Ce-0004Go-CE for geb-bug-gnu-emacs@m.gmane.org; Sun, 22 Sep 2019 10:51:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43368) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iC3CZ-0004Gh-6M for bug-gnu-emacs@gnu.org; Sun, 22 Sep 2019 10:51:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iC3CY-0003LW-4r for bug-gnu-emacs@gnu.org; Sun, 22 Sep 2019 10:51:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53740) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iC3CY-0003LB-1W for bug-gnu-emacs@gnu.org; Sun, 22 Sep 2019 10:51:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iC3CX-0002Ir-UQ for bug-gnu-emacs@gnu.org; Sun, 22 Sep 2019 10:51:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Sep 2019 14:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37480 X-GNU-PR-Package: emacs Original-Received: via spool by 37480-submit@debbugs.gnu.org id=B37480.15691638278799 (code B ref 37480); Sun, 22 Sep 2019 14:51:01 +0000 Original-Received: (at 37480) by debbugs.gnu.org; 22 Sep 2019 14:50:27 +0000 Original-Received: from localhost ([127.0.0.1]:34328 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iC3Bz-0002Hr-IU for submit@debbugs.gnu.org; Sun, 22 Sep 2019 10:50:27 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:34856) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iC3Bx-0002Hf-Mf for 37480@debbugs.gnu.org; Sun, 22 Sep 2019 10:50:26 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:59942) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iC3Bq-0002m9-9J; Sun, 22 Sep 2019 10:50:18 -0400 Original-Received: from [176.228.60.248] (port=4742 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iC3Bn-0003Ma-5R; Sun, 22 Sep 2019 10:50:16 -0400 In-reply-to: (message from Christian Johansson on Sun, 22 Sep 2019 16:00:38 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:166910 Archived-At: > From: Christian Johansson > Date: Sun, 22 Sep 2019 16:00:38 +0200 > > I want to handle errors occurring in asynchronous threads like in this > example, is it possible? For some value of "possible". From the ELisp manual: When code run by a thread signals an error that is unhandled, the thread exits. Other threads can access the error form which caused the thread to exit using the following function. -- Function: thread-last-error This function returns the last error form recorded when a thread exited due to an error. Each thread that exits abnormally overwrites the form stored by the previous thread’s error with a new value, so only the last one can be accessed. > (make-thread > (lambda() > (message "Start of asynchronous thread") > (signal 'error '("Fatal error")) > (message "End of asynchronous thread"))) I'm not sure I understand what you tried to accomplish with this code. It doesn't seem to handle errors in any way. Could you explain what you are trying to do?