[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] handle "unbound variable" exception for undefined pr
From: |
felix winkelmann |
Subject: |
Re: [Chicken-users] handle "unbound variable" exception for undefined procedures? |
Date: |
Thu, 8 Jan 2009 10:56:48 +0100 |
On Thu, Jan 8, 2009 at 4:58 AM, Shawn Rutledge
<address@hidden> wrote:
> On 1/6/09, Shawn Rutledge <address@hidden> wrote:
>> Now by reading the source I've discovered ##sys#unbound-in-eval. I
>> guess I can get the unbound variable name from there (and expect it to
>> break some day) unless somebody has a better idea...
>
> But ##sys#unbound-in-eval is defined only when eval'ing, not for
> compiled code, and not even when I put the test code into a file and
> "csi file.scm".
>
> (use lolevel)
> (define (handler . args) (printf "something called with ~a; unbound
> ~a~%" args ##sys#unbound-in-eval))
> (unbound-variable-value handler)
> (x 3)
> (x y 3 6)
>
>
##sys#unbound-in-eval is only for error-reporting - it
records unbound variable while preparing s-expression
for interpretation, so it has no direct relation to the unbound-variable-value
thing.
cheers,
felix