From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Christian Johansson Newsgroups: gmane.emacs.bugs Subject: bug#37480: 27.0.50; uncaught exception Date: Tue, 24 Sep 2019 05:16:41 +0200 Message-ID: References: <838sqgqtam.fsf@gnu.org> <8336goqr10.fsf@gnu.org> <06831c73-1a16-7e53-e872-f3fe97df534d@cvj.se> <83d0frotnf.fsf@gnu.org> Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="221048"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 37480@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 24 05:17:13 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 1iCbKC-000vPJ-HS for geb-bug-gnu-emacs@m.gmane.org; Tue, 24 Sep 2019 05:17:12 +0200 Original-Received: from localhost ([::1]:40470 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCbKB-0001UF-2R for geb-bug-gnu-emacs@m.gmane.org; Mon, 23 Sep 2019 23:17:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41400) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iCbK3-0001U4-T2 for bug-gnu-emacs@gnu.org; Mon, 23 Sep 2019 23:17:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iCbK2-0002S7-Rg for bug-gnu-emacs@gnu.org; Mon, 23 Sep 2019 23:17:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56793) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iCbK2-0002Ry-EN for bug-gnu-emacs@gnu.org; Mon, 23 Sep 2019 23:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iCbK2-0007Hj-8r for bug-gnu-emacs@gnu.org; Mon, 23 Sep 2019 23:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Christian Johansson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 Sep 2019 03:17:02 +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.156929501027966 (code B ref 37480); Tue, 24 Sep 2019 03:17:02 +0000 Original-Received: (at 37480) by debbugs.gnu.org; 24 Sep 2019 03:16:50 +0000 Original-Received: from localhost ([127.0.0.1]:37375 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCbJq-0007H0-Ft for submit@debbugs.gnu.org; Mon, 23 Sep 2019 23:16:50 -0400 Original-Received: from cvj.se ([31.192.230.63]:58936) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iCbJn-0007Gn-9C for 37480@debbugs.gnu.org; Mon, 23 Sep 2019 23:16:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cvj.se; s=x; h=To:References:Message-Id:Content-Transfer-Encoding:Cc:Date:In-Reply-To:From:Subject:Mime-Version:Content-Type; bh=TKhMvuMikmDPEw9g9H+DPxNkMe8960xBWleEWLbTgfY=; b=LMbSPcv827ez1M2AS1xeooxOTjq7Re3NPiEMYO8T2XAiaAl1P7hrlXVJWOU5+hjhSN5z75sBdiV5xdUXTntvM/kG3njHslphkI2eeIrw1nD/WLIFsoNSlLw3LqyZ+m3sNbxUvFu52iSZs9IdvsdMCMXc69nwFcl1Uzz4/pYtVUw=; Original-Received: from c-2f5ee255.011-155-65736b4.bbcust.telenor.se ([85.226.94.47] helo=[192.168.1.11]) by cvj.se with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1iCbJk-0004Kt-0M; Tue, 24 Sep 2019 05:16:45 +0200 X-Mailer: iPhone Mail (16G102) In-Reply-To: <83d0frotnf.fsf@gnu.org> 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:167061 Archived-At: Ok thanks, now I understand 23 sep. 2019 kl. 18:37 skrev Eli Zaretskii : >> Cc: 37480@debbugs.gnu.org >> From: Christian Johansson >> Date: Mon, 23 Sep 2019 07:18:25 +0200 >> >> Alright, I didn't know about that function. Can you give an example of >> how to use it? It tried the following but it doesn't work, it seems the >> thread dies after the signal and I'm not sure were it exits. >> >> (make-thread >> (lambda() >> (message "Start of asynchronous thread") >> (signal 'error '("Fatal error")) >> (message "End of asynchronous thread") >> (message "Last error %s" (thread-last-error)))) > > This function is supposed to be used by a thread other than the one > that hit the error. > >> For my ssh-deploy plugin, sometimes a asynchronous process or thread >> gets an error, could be network issues for instance and I would like to >> be able to handle these cases. > > If you want to handle the error in the thread which gets the error, > just use condition-case or similar construct in that thread. If you > want to handle the error in another thread, thread-last-error is for > you.