This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Better error messages...
- To: guile at sourceware dot cygnus dot com
- Subject: Better error messages...
- From: "Greg J. Badros" <gjb at cs dot washington dot edu>
- Date: 02 Mar 2000 16:12:24 -0800
One of the improvements I was planning on making with the big
software-engineering face-lift of a couple months ago was better error
reporting. I finally put the last little piece in place to add a bunch
of value to a *lot* of error messages (but by no means does it cover all
messages that could be improved). Now, if you eval, e.g.:
(set-car! 1 'a)
Instead of just this message:
Backtrace:
0* [set-car! 1 a]
ERROR: In procedure set-car! in expression (set-car! 1 (quote a)):
ERROR: Wrong type argument in position 1: 1
ABORT: (wrong-type-arg)
You get information about what type was expected:
Backtrace:
0* [set-car! 1 a]
ERROR: In procedure set-car! in expression (set-car! 1 (quote a)):
ERROR: Wrong type argument in position 1 (expecting CONSP): 1
ABORT: (wrong-type-arg)
^^^^^^^^^^^^^^^^^
This was done with a very small change to the macro expansion of the
macro used to create the various SCM_VALIDATE macro definitions, so the
effects are (thankfully) fairly widespread.
Hopefully this will substantially help in debugging when Scheme code
goes awry.
Greg B.