* Highlighting in backtraces
@ 2004-09-23 18:05 Marius Vollmer
2004-09-23 18:37 ` Paul Jarc
0 siblings, 1 reply; 2+ messages in thread
From: Marius Vollmer @ 2004-09-23 18:05 UTC (permalink / 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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Highlighting in backtraces
2004-09-23 18:05 Highlighting in backtraces Marius Vollmer
@ 2004-09-23 18:37 ` Paul Jarc
0 siblings, 0 replies; 2+ messages in thread
From: Paul Jarc @ 2004-09-23 18:37 UTC (permalink / raw)
Cc: guile-devel
Marius Vollmer <mvo@zagadka.de> wrote:
> Of course, the highlighting itself needs to be made configurable, and
> maybe auomatically use boldface or color on terminals that support it.
Making it textually unambiguous would be good too. Maybe #>foo<#?
paul
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-09-23 18:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-23 18:05 Highlighting in backtraces Marius Vollmer
2004-09-23 18:37 ` Paul Jarc
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).