bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#37480: 27.0.50; uncaught exception


From: Christian Johansson
Subject: bug#37480: 27.0.50; uncaught exception
Date: Tue, 24 Sep 2019 05:16:41 +0200

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 via email to

[Prev in Thread] Current Thread [Next in Thread]