Better unbound variable error message
Bug #164889 reported by
Michael D. Adams
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ikarus Scheme |
Confirmed
|
Low
|
Abdulaziz Ghuloum |
Bug Description
The following error message would be better if it reported "unbound variable" on "foo" instead of "baz" as the missing "foo" might be a macro which defines "baz". As it is, the user (assuming that "foo" was successfully imported) is left wondering why "foo" isn't working.
$ rlwrap ikarus
Ikarus Scheme version 0.0.2-rc1+ (revision 1125, build 2007-11-24)
Copyright (c) 2006-2007 Abdulaziz Ghuloum
> (foo bar baz)
Unhandled exception
Condition components:
1. &error
2. &who: eval
3. &message: "unbound variable"
4. &irritants: (baz)
To post a comment you must log in.
This is a runtime error (in eval) so you might actually get an error in foo, bar, or baz whichever is evaluated first. If you were inside a library/script, you would've gotten an an error in foo. In your example, foo was actually successfully imported into the top-level and was given an "uninitialized" value, and so was bar and baz. That's why you'd get a conflict when you attempt to import a library that exports foo, as in bug 162785 :-)
Ikarus (usually) evaluates the operator of a procedure call after all arguments have been evaluated, and the arguments are evaluated in some order depending on the arguments themselves.