This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Confusing error message
- From: Charles Turner <chturne at gmail dot com>
- To: kawa at sourceware dot org
- Date: Thu, 14 Apr 2011 20:36:42 +0100
- Subject: Confusing error message
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Consider this interaction,
#|kawa:1|# (cdr '())
Argument #1 (()) to 'cdr' has wrong type (gnu.lists.LList)
<snip stack trace>
Saying the argument was (()) seems wrong, and in cases not as trivial as
this, I can imagine it being confusing, more cdr'ing gives less
ambiguous errors,
#|kawa:2|# (cddr '(()))
Invalid parameter, was: gnu.lists.LList cannot be cast to gnu.lists.Pair
<snip stack trace>
Maybe the first case should have a error similar to the second (and
beyond) cases, if possible. Or maybe you could change the delimeter in
gnu/mapping/WrongType.java (getMessage()) from '(' to ''' (single
quote), I made the second change and now get the following output for
the first case,
#|kawa:1|# (cdr '())
Argument #1 '()' to 'cdr' has wrong type (gnu.lists.LList)
but I'm unsure if that's wanted.
Charles.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iQEcBAEBAgAGBQJNp0zKAAoJEG9M6fiX7bE4b+EH+wfsPRAuKYdnPDL9rKvkOdBg
D84ifGbUwWq0sElKdRcjqnx7TTqzk1k1llqkZ7UseHRSWd4JVyM9PjKn/zITOVZl
Gbc0XdHzsquk/Vzh9AsPEWFEdxh7RP3oV1S+gTarxLf3DlOLo2TzSLSFFDy3vG/x
CX7CnT+sKwfrdrEUbJUxG/v+pFKv42I/hPzuRnqF24hfjzyRi11eW6wmWRcTkzCh
PDtO+YJMre+tOZgyQk3Hge5+oOgR5dymPLWOC1ENDfz1dMvuAYNPVlGpykb+ehZ3
elyF+yeU4J6mOaS6hmPD2gcNqhI11dDUk+PiO9FGKKWZsm0nEf6uEdpmzDXQx6A=
=CuaK
-----END PGP SIGNATURE-----