From: Alex <agrambot@gmail.com>
To: emacs-devel@gnu.org
Subject: Accuracy of procedure name in error messages
Date: Mon, 09 Oct 2017 12:30:48 -0600 [thread overview]
Message-ID: <87wp44b2cn.fsf@gmail.com> (raw)
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?
reply other threads:[~2017-10-09 18:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=87wp44b2cn.fsf@gmail.com \
--to=agrambot@gmail.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.