unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#14308: 24.3.50; Better error messages for `timer-event-handler'
@ 2013-04-29 17:26 Michael Heerdegen
  2013-05-04 20:15 ` Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Heerdegen @ 2013-04-29 17:26 UTC (permalink / raw)
  To: 14308

[-- Attachment #1: Type: text/plain, Size: 571 bytes --]


Hi,

since some time, `timer-event-handler' messages error messages in case
of errors (when debug-on-error is nil).  This is good!

However, in my experience these messages as such are currently not very
helpful.  E.g I get a message like

|  Error running timer: (error "Selecting deleted buffer")

Mmh.

I can try setting `debug-on-error' to t (which is a pain in the
ass as long as `user-error' is not very widespread, btw) and hope that
it "happens again".  But it would be better if the message would be more
informative.  E.g. we would win a lot with doing this:


[-- Attachment #2: Type: text/plain, Size: 994 bytes --]

*** /home/micha/today/timer.el	2013-04-29 19:14:33.352241368 +0200
--- /home/micha/today/timer-new.el	2013-04-29 19:15:17.727761145 +0200
***************
*** 313,319 ****
                ;; 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)))
  	  (when (and retrigger (memq timer timer-list)) ;; Stefans fix
              (setf (timer--triggered timer) nil)))
        (error "Bogus timer event"))))
--- 313,319 ----
                ;; 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 function %s: %S" (timer--function timer) err)))
  	  (when (and retrigger (memq timer timer-list)) ;; Stefans fix
              (setf (timer--triggered timer) nil)))
        (error "Bogus timer event"))))

[-- Attachment #3: Type: text/plain, Size: 379 bytes --]


It would at least reveal where I have to dig.  Better ideas appreciated!


Regards,

Michael.



In GNU Emacs 24.3.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.2)
 of 2013-04-27 on dex, modified by Debian
 (emacs-snapshot package, version 2:20130427-1)
Windowing system distributor `The X.Org Foundation', version 11.0.11204000
System Description:	Debian GNU/Linux 7.0 (wheezy)


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

end of thread, other threads:[~2013-05-06 16:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-29 17:26 bug#14308: 24.3.50; Better error messages for `timer-event-handler' Michael Heerdegen
2013-05-04 20:15 ` Stefan Monnier
2013-05-06  1:59   ` Michael Heerdegen
2013-05-06  7:26     ` Glenn Morris
2013-05-06 16:08       ` Michael Heerdegen
2013-05-06 16:20         ` Michael Heerdegen

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).