* Accuracy of procedure name in error messages
@ 2017-10-09 18:30 Alex
0 siblings, 0 replies; only message in thread
From: Alex @ 2017-10-09 18:30 UTC (permalink / raw)
To: emacs-devel
For what brought up this question, see:
https://lists.gnu.org/archive/html/bug-gnu-emacs/2017-10/msg00261.html
The procedure that's named in error messages seems to be incorrect in
some cases, especially in bytecode.
For example, evaluate:
(defun outer ()
(inner))
(defun inner ()
(setq global (1+ nil)))
With eval-expression-debug-on-error non-nil, evaluate (outer). The
debugger pops up with "1+(nil)" at the top, but the error message
displayed after continuing is:
setq: Wrong type argument: number-or-marker-p, nil
Shouldn't it say "1+: Wrong type..."?
Now if you byte-compile `outer' and `inner' and evaluate (outer), then
the debugger pops up with "inner()" at the top. The error message
displayed after continuing is:
outer: Wrong type argument: number-or-marker-p, nil
So it seems that the error message is created one frame off, and the
bytecode versions ignore primitives like `setq' and `1+'.
Is this a known limitation, and/or should I file a bug report?
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-10-09 18:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-09 18:30 Accuracy of procedure name in error messages Alex
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).