unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Why timers are now catching errors
@ 2013-01-13 13:24 Thierry Volpiatto
  2013-01-13 14:29 ` Stefan Monnier
  0 siblings, 1 reply; 21+ messages in thread
From: Thierry Volpiatto @ 2013-01-13 13:24 UTC (permalink / raw)
  To: emacs-devel

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 




^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2013-01-14  1:28 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-13 13:24 Why timers are now catching errors Thierry Volpiatto
2013-01-13 14:29 ` Stefan Monnier
2013-01-13 14:54   ` Thierry Volpiatto
2013-01-13 15:34     ` Stefan Monnier
2013-01-13 15:51       ` Thierry Volpiatto
2013-01-13 15:55         ` Thierry Volpiatto
2013-01-13 17:30           ` Thierry Volpiatto
2013-01-13 18:13             ` Eli Zaretskii
2013-01-13 18:18             ` Eli Zaretskii
2013-01-13 18:38               ` Thierry Volpiatto
2013-01-13 18:52                 ` Thierry Volpiatto
2013-01-13 19:02                   ` Eli Zaretskii
2013-01-13 19:07                     ` Thierry Volpiatto
2013-01-13 20:05                       ` Eli Zaretskii
2013-01-13 20:37                         ` Eli Zaretskii
2013-01-13 20:22                       ` Eli Zaretskii
2013-01-13 20:31                         ` Thierry Volpiatto
2013-01-13 22:55                   ` Stefan Monnier
2013-01-13 23:03                     ` chad
2013-01-14  1:28                       ` Stefan Monnier
2013-01-13 22:50         ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).