On 12/24/08, Kon Lovett <[email protected]> wrote:
>  Have you looked in Unit lolevel at
> 'set-invalid-procedure-call-handler!' &
> 'unbound-variable-value'? These, plus perhaps 'object-become', might be
> useful.
>
>  #;1> (use lolevel)
>  ; loading library lolevel ...
>  #;2> (unbound-variable-value 'unbound)
>  #(unbound)
>  #;3> (set-invalid-procedure-call-handler! (lambda (p as)
> (print "No Such Procedure: " p ", Called With: " as) 'bar))
>  #<procedure (##sys#invalid-procedure-call-hook .
> args1208)>
>  #;6> (x "foo")
>  No Such Procedure: unbound, Called With: (foo)
>  Warning: the following toplevel variables are referenced but unbound:
>   x
>  bar
>  #;7> (enable-warnings #f)
>  #f
>  #;8> (x "foo")
>  No Such Procedure: unbound, Called With: (foo)
>  bar

Thanks very much, I did not know about these features.

However the trouble is that the name of the unbound variable (the name
of the function that was to be called) is still lost, even though the
warning prints it out.

I don't think I'm following what you were thinking about object-become.

>  The unbound warning is a problem. I dislike turning off such a system just
> for a single annoyance.

Yes.


_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to