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: Eli Zaretskii
Subject: bug#37480: 27.0.50; uncaught exception
Date: Sun, 22 Sep 2019 18:39:23 +0300

> Cc: 37480@debbugs.gnu.org
> From: Christian Johansson <christian@cvj.se>
> Date: Sun, 22 Sep 2019 17:26:28 +0200
> 
> (condition-case
>      nil
>      (make-thread
>       (lambda()
>         (message "Start of asynchronous thread")
>         (signal 'error '("Fatal error"))
>         (message "End of asynchronous thread")))
>    (message "Catched error"))
> 
> I have a case were a error occurs inside a tramp thread and I would like 
> to be able to handle it

You don't need condition-case in this case, you just need to examine
the value of thread-last-error when the thread exits.

Alternatively, you could try making the thread you start signal the
main thread, then the main thread should be able to catch that error.

In general, errors are thread-local, so you cannot catch an error
signaled in another thread.





reply via email to

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