unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Christian Johansson <christian@cvj.se>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 37480@debbugs.gnu.org
Subject: bug#37480: 27.0.50; uncaught exception
Date: Tue, 24 Sep 2019 05:16:41 +0200	[thread overview]
Message-ID: <C690DC8D-068D-43F5-9E3D-17CA32160D40@cvj.se> (raw)
In-Reply-To: <83d0frotnf.fsf@gnu.org>

Ok thanks, now I understand

23 sep. 2019 kl. 18:37 skrev Eli Zaretskii <eliz@gnu.org>:

>> Cc: 37480@debbugs.gnu.org
>> From: Christian Johansson <christian@cvj.se>
>> 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.





  reply	other threads:[~2019-09-24  3:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-22 14:00 bug#37480: 27.0.50; uncaught exception Christian Johansson
2019-09-22 14:50 ` Eli Zaretskii
2019-09-22 15:26   ` Christian Johansson
2019-09-22 15:39     ` Eli Zaretskii
2019-09-23  5:18       ` Christian Johansson
2019-09-23  7:14         ` Michael Albinus
2019-09-23 16:37         ` Eli Zaretskii
2019-09-24  3:16           ` Christian Johansson [this message]
2019-09-22 16:53     ` Michael Albinus
2019-11-07  4:25       ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C690DC8D-068D-43F5-9E3D-17CA32160D40@cvj.se \
    --to=christian@cvj.se \
    --cc=37480@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).