unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: 14308@debbugs.gnu.org
Subject: bug#14308: 24.3.50; Better error messages for `timer-event-handler'
Date: Mon, 29 Apr 2013 19:26:27 +0200	[thread overview]
Message-ID: <87sj29dz98.fsf@web.de> (raw)

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


             reply	other threads:[~2013-04-29 17:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-29 17:26 Michael Heerdegen [this message]
2013-05-04 20:15 ` bug#14308: 24.3.50; Better error messages for `timer-event-handler' 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sj29dz98.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=14308@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).