all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Drew Adams <drew.adams@oracle.com>
Cc: emacs-devel@gnu.org
Subject: Re: use of `user-error'
Date: Sun, 05 May 2013 00:45:45 -0400	[thread overview]
Message-ID: <jwvsj22ox6o.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <8738u99q5p.fsf@web.de> (Michael Heerdegen's message of "Mon, 29 Apr 2013 19:56:34 +0200")

> I would love to have `debug-on-error' bound to t all the time, to get an
> immediate backtrace of errors that happen very rarely and are hard to
> reproduce.  But getting a popped up debugger every time I hit a wrong
> key or did something obviously wrong by accident is a pain in the ass.

I do have debug-on-error set to t in my .emacs.  If you regularly get
backtraces in this situation, then we should probably replace some
of those errors with user-errors.

> So, can we try to substitute the appropriate occurrences of `error' by
> `user-error', or are there any things that prevent us from doing that?

Nothing, except for the fact that we should do it on
a case-by-case basis.

`user-error' was mostly introduced to trim down debug-ignored-errors and
to make it easier for the programmer to signal a non-backtrace-popping
error (which used to require adding an entry to debug-ignored-errors).
And yes, there are many `error's which would benefit from being turned
into `user-errors'.  But search&replace is not a good way to do it.


        Stefan



  parent reply	other threads:[~2013-05-05  4:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-07 16:36 use of `user-error' Drew Adams
2013-04-29 17:56 ` Michael Heerdegen
2013-04-30 12:00   ` Xue Fuqiao
2013-05-05  4:45   ` Stefan Monnier [this message]
2013-05-05 13:29     ` Drew Adams
2013-05-05 13:40       ` Dmitry Gutov
2013-05-05 18:16         ` Josh
2013-05-06  1:44           ` Stefan Monnier
2013-05-08 13:24         ` Xue Fuqiao

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

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

  git send-email \
    --in-reply-to=jwvsj22ox6o.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=drew.adams@oracle.com \
    --cc=emacs-devel@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 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.