emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: use of `user-error'


From: Stefan Monnier
Subject: Re: use of `user-error'
Date: Sun, 05 May 2013 00:45:45 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]