Error message referencing "main"

Bug #164173 reported by Michael D. Adams on 2007-11-20
Affects Status Importance Assigned to Milestone
Ikarus Scheme
Abdulaziz Ghuloum

Bug Description

Calling a record-type constructor with the wrong number of arguments produces an error that makes it sound like the main program was missing args. Also was "expecting args" originally with a numeric parameter? E.g. "expecting 0 args, got 1". Without the numbers it makes it sound like you didn't get args when you were expecting some.

> (define-record-type foo)
> (make-foo 1)
Unhandled exception
 Condition components:
   1. &error
   2. &who: record-constructor
   3. &message: "main expecting args, got"
   4. &irritants: (0 (1))

Abdulaziz Ghuloum (aghuloum) wrote :

That was an error message I inserted when debugging my records implementation. Will fix. Thanks.

Changed in ikarus:
assignee: nobody → aghuloum
importance: Undecided → Medium
status: New → Confirmed
Abdulaziz Ghuloum (aghuloum) wrote :

Fixed in revision 1099.
Does this feel better:

> (define-record-type foo (fields a))
> (make-foo)
Unhandled exception
 Condition components:
   1. &error
   2. &who: a-record-constructor
   3. &message: "expected 1 args, got 0 instead"
> (make-foo 'x)
#[foo x]
> (make-foo 'x 'y 'z)
Unhandled exception
 Condition components:
   1. &error
   2. &who: a-record-constructor
   3. &message: "expected 1 args, got 3 instead"
   4. &irritants: (x y z)

Reopen if you have better ideas.

Changed in ikarus:
status: Confirmed → 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.2 release of Ikarus Scheme,
scheduled for November 28, 2007.
A release candidate tarball is available for download from:
Please do test it if you have the time and report any issues you
might encounter. Thank you very much for your support. Aziz,,,
(Sorry for the duplicates; I'm updating every open bug.)

Changed in ikarus:
milestone: none → 0.0.2
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