[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Why timers are now catching errors
From: |
Thierry Volpiatto |
Subject: |
Why timers are now catching errors |
Date: |
Sun, 13 Jan 2013 14:24:24 +0100 |
User-agent: |
Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux) |
Hi,
is there a particular reason to catch errors in timers functions ?
--8<---------------cut here---------------start------------->8---
(condition-case-unless-debug err
;; Timer functions should not change the current buffer.
;; If they do, all kinds of nasty surprises can happen,
;; and it can be hellish to track down their source.
(save-current-buffer
(apply (timer--function timer) (timer--args timer)))
(error (message "Error in timer: %S" err)))
--8<---------------cut here---------------end--------------->8---
Timer functions may return errors or diverses different values
at one time and next time no errors etc...
This change will break many commands using timers.
This happen in `timer-event-handler', hope this will not be merged in
24.3...
--
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
- Why timers are now catching errors,
Thierry Volpiatto <=
- Re: Why timers are now catching errors, Stefan Monnier, 2013/01/13
- Re: Why timers are now catching errors, Thierry Volpiatto, 2013/01/13
- Re: Why timers are now catching errors, Stefan Monnier, 2013/01/13
- Re: Why timers are now catching errors, Thierry Volpiatto, 2013/01/13
- Re: Why timers are now catching errors, Thierry Volpiatto, 2013/01/13
- Re: Why timers are now catching errors, Thierry Volpiatto, 2013/01/13
- Re: Why timers are now catching errors, Eli Zaretskii, 2013/01/13
- Re: Why timers are now catching errors, Eli Zaretskii, 2013/01/13
- Re: Why timers are now catching errors, Thierry Volpiatto, 2013/01/13
- Re: Why timers are now catching errors, Thierry Volpiatto, 2013/01/13