From: Marius Vollmer <mvo@zagadka.de>
Subject: Highlighting in backtraces
Date: Thu, 23 Sep 2004 20:05:43 +0200 [thread overview]
Message-ID: <87vfe497yg.fsf@zagadka.ping.de> (raw)
Hi,
I have committed a little experiment to CVS HEAD: the bad value that
triggered a wrong-type-arg or out-of-range error is now highlighted in
backtraces. This should compensate for the fact that argument
positions and subr names are now often missing from error messages.
Please update, make lots of errors, and let me know what you think
about it.
Previously, you would get an error message like this:
guile> (caaar (cons (cons 'a #f) #f))
Backtrace:
In current input:
1: 0* [caaar ((a . #f) . #f)]
<unnamed port>:1:1: In procedure caaar in expression (caaar (cons # #f)):
<unnamed port>:1:1: Wrong type argument in position 1: a
ABORT: (wrong-type-arg)
Now it is
guile> (caaar (cons (cons 'a #f) #f))
Backtrace:
In current input:
1: 0* [caaar (({a} . #f) . #f)]
<unnamed port>:1:1: In procedure caaar in expression (caaar (cons # #f)):
<unnamed port>:1:1: Wrong type (expecting pair): a
ABORT: (wrong-type-arg)
Note the "{a}": this indicates that this part of the expression is
'eq?' to the value with the wrong type.
Of course, the highlighting itself needs to be made configurable, and
maybe auomatically use boldface or color on terminals that support it.
--
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel
next reply other threads:[~2004-09-23 18:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-23 18:05 Marius Vollmer [this message]
2004-09-23 18:37 ` Highlighting in backtraces Paul Jarc
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/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87vfe497yg.fsf@zagadka.ping.de \
--to=mvo@zagadka.de \
/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.
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).