Strange error message

Bug #176710 reported by Michael D. Adams on 2007-12-16
2
Affects Status Importance Assigned to Milestone
Ikarus Scheme
Low
Abdulaziz Ghuloum

Bug Description

This message wasn't too hard to figure out but it is a bit strange:

> (caddr (list 1 2))
Unhandled exception
 Condition components:
   1. &assertion
   2. &who: caddr
   3. &message: "invalid list structure"
   4. &irritants: ((1 2))

The argument actually is a valid list structure, its just not long enough for caddr. Note that the same error is also given for caar so just changing it to "list to short" would also be wrong.

Again, given the &irritants and the &who, its not too hard to figure out the actual error, but the &message is way off base.

> Again, given the &irritants and the &who, its not too hard to
> figure out
> the actual error, but the &message is way off base.

Okay, what do you propose it should be?

BTW: this is almost the same message that Chez gives, and frankly,
for any
of the c[ad]+r functions, there is only one way for them to go wrong and
that should go without explanation.

Michael D. Adams (mdmkolbe) wrote :

Brainstorming:
 - "incorrect pair structure"
 - "cadr was not a pair" (e.g. in a cdadr).
 - "Found non-pair when expecting pair"
 - "unexpected non-pair found"
 - "unexpected non-pair in argument"

I think I would recommend something like the last one. Saying "unexpected" clarifies that only some non-pairs are a problem, and saying "in" clarifies that is may be a sub-part of the argument.

How about "argument does not have required pair structure"?

Michael D. Adams (mdmkolbe) wrote :

That sounds good.

Abdulaziz Ghuloum (aghuloum) wrote :

Fixed in revision 1259.

Changed in ikarus:
assignee: nobody → aghuloum
importance: Undecided → Low
status: New → Fix Committed
Abdulaziz Ghuloum (aghuloum) wrote :

This bug report is about to be closed as the fix comitted
previously will be incorporated in the next 0.0.3 release of
Ikarus Scheme, scheduled for January 31, 2008. A release
candidate tarball is available for download from:
http://www.cs.indiana.edu/~aghuloum/ikarus/ikarus-0.0.3-rc1.tar.gz
Please do test it if you have the time and report any issues
you might encounter. Thank you very much for your support.
(Sorry for the duplicates; I'm updating every open bug.)

Changed in ikarus:
milestone: none → 0.0.3
Changed in ikarus:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers