GSOC | Extending Common Lisp support
Per Bothner
per@bothner.com
Thu Jun 28 20:44:00 GMT 2012
On 06/28/2012 01:22 PM, Charles Turner wrote:
> #|kawa:1|# (defpackage "GF" (:use 'cl))
> /dev/stdin:1:1: evaluating syntax transformer 'defpackage' threw
> java.lang.ClassCastException: java.lang.String cannot be cast to
> gnu.text.Char
>
> I've no idea what this is pointing to. I don't see where gnu.text.Char
> is coming into play. Sorry about dumping out-of-context code on you, I
> was hoping I'm being silly and the error is obvious to fresh eyes! Any
> pointers on how I might get more information with macro problems? Are
> stack traces possible?
What I do in such cases is search for the error message
"evaluating syntax transformer" in the source code, and then I
put a printStackTrace there (or breakpoint if you use a debugger).
Perhaps printing out the exception stack trace in this case should
be the default.
However, that may help a whole lot. Basically you have to debug
the syntax transformer which may be painful. Printing out
diagnostics in the macro may help.
--
--Per Bothner
per@bothner.com http://per.bothner.com/
More information about the Kawa
mailing list