[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Highlighting in backtraces
From: |
Marius Vollmer |
Subject: |
Highlighting in backtraces |
Date: |
Thu, 23 Sep 2004 20:05:43 +0200 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Highlighting in backtraces,
Marius Vollmer <=