* Errors in timers
@ 2007-07-01 10:44 Lennart Borgman (gmail)
2007-07-01 15:41 ` Andreas Schwab
2007-07-01 16:32 ` Richard Stallman
0 siblings, 2 replies; 4+ messages in thread
From: Lennart Borgman (gmail) @ 2007-07-01 10:44 UTC (permalink / raw)
To: Emacs Devel
How is errors in timers supposed to be handled? It looks like those
errors are only seen if you set debug-on-signal.
If there are not already any better way to handle this in Emacs I think
it would be good if something to do it was added.
Here is some test code:
(run-with-idle-timer 1 nil
(lambda()
(lwarn 't :warning "before")
(let ((x (/ 1 0))))
(lwarn 't :warning "after")
))
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Errors in timers
2007-07-01 10:44 Errors in timers Lennart Borgman (gmail)
@ 2007-07-01 15:41 ` Andreas Schwab
2007-07-01 20:49 ` Lennart Borgman (gmail)
2007-07-01 16:32 ` Richard Stallman
1 sibling, 1 reply; 4+ messages in thread
From: Andreas Schwab @ 2007-07-01 15:41 UTC (permalink / raw)
To: Lennart Borgman (gmail); +Cc: Emacs Devel
"Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
> How is errors in timers supposed to be handled? It looks like those errors
> are only seen if you set debug-on-signal.
Timer functions are run inside condition-case, so error are caught and
ignored. See timer-event-handler.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Errors in timers
2007-07-01 15:41 ` Andreas Schwab
@ 2007-07-01 20:49 ` Lennart Borgman (gmail)
0 siblings, 0 replies; 4+ messages in thread
From: Lennart Borgman (gmail) @ 2007-07-01 20:49 UTC (permalink / raw)
To: Andreas Schwab; +Cc: Emacs Devel
Andreas Schwab wrote:
> "Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
>
>> How is errors in timers supposed to be handled? It looks like those errors
>> are only seen if you set debug-on-signal.
>
> Timer functions are run inside condition-case, so error are caught and
> ignored. See timer-event-handler.
Yes, I do not remember exactly why it was added now, but I think it
would be very good to be able to see the errors to. Currently the only
way is to set debug-on-signal to t and that is a real sledge hammer.
As I see it it would be good to take care of this individually for
different timers.
I have no proposal for exactly how. The need might be a bit different
from when running a function directly. Timers can for example be run
repeatedly and maybe the fail sometimes and otherwise perform well.
Stopping them with a trace back might not be that good then. Perhaps
some kind of logging is better in such cases.
I myself currently put a highlighted traceback in the message buffer and
give a single message line to the user about that.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Errors in timers
2007-07-01 10:44 Errors in timers Lennart Borgman (gmail)
2007-07-01 15:41 ` Andreas Schwab
@ 2007-07-01 16:32 ` Richard Stallman
1 sibling, 0 replies; 4+ messages in thread
From: Richard Stallman @ 2007-07-01 16:32 UTC (permalink / raw)
To: Lennart Borgman (gmail); +Cc: emacs-devel
How is errors in timers supposed to be handled? It looks like those
errors are only seen if you set debug-on-signal.
Could you make the question more specific? I am not sure
what "handled" means here.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-07-01 20:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-01 10:44 Errors in timers Lennart Borgman (gmail)
2007-07-01 15:41 ` Andreas Schwab
2007-07-01 20:49 ` Lennart Borgman (gmail)
2007-07-01 16:32 ` Richard Stallman
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.