GNU bug report logs - #37480
27.0.50; uncaught exception

Previous Next

Package: emacs;

Reported by: Christian Johansson <christian <at> cvj.se>

Date: Sun, 22 Sep 2019 14:03:01 UTC

Severity: normal

Tags: moreinfo

Found in version 27.0.50

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


Message #26 received at 37480 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Christian Johansson <christian <at> cvj.se>
Cc: 37480 <at> debbugs.gnu.org
Subject: Re: bug#37480: 27.0.50; uncaught exception
Date: Mon, 23 Sep 2019 19:37:56 +0300
> Cc: 37480 <at> debbugs.gnu.org
> From: Christian Johansson <christian <at> 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.




This bug report was last modified 5 years and 192 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.