GNU bug report logs -
#37480
27.0.50; uncaught exception
Previous Next
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
View this message in rfc822 format
> From: Christian Johansson <christian <at> cvj.se>
> Date: Sun, 22 Sep 2019 16:00:38 +0200
>
> I want to handle errors occurring in asynchronous threads like in this
> example, is it possible?
For some value of "possible". From the ELisp manual:
When code run by a thread signals an error that is unhandled, the
thread exits. Other threads can access the error form which caused the
thread to exit using the following function.
-- Function: thread-last-error
This function returns the last error form recorded when a thread
exited due to an error. Each thread that exits abnormally
overwrites the form stored by the previous thread’s error with a
new value, so only the last one can be accessed.
> (make-thread
> (lambda()
> (message "Start of asynchronous thread")
> (signal 'error '("Fatal error"))
> (message "End of asynchronous thread")))
I'm not sure I understand what you tried to accomplish with this code.
It doesn't seem to handle errors in any way. Could you explain what
you are trying to do?
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.