chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] how to handle errors under callbacks?


From: felix winkelmann
Subject: Re: [Chicken-users] how to handle errors under callbacks?
Date: Thu, 25 Oct 2007 07:19:01 +0200

On 10/25/07, Rick Taube <address@hidden> wrote:
>
> Error: unbound variable: exn
>
>          Call history:
>
>          <eval>          [foo] (mp:note 0 90 (+ k i) 80 0)
>          <eval>          [foo] (+ k i)
>          ChickenBridge.scm: 214  insert-midi-note
>          ##sys#gc
>          <eval>          [foo] (wait 100)
>          <eval>          [foo] (+ i 1)
>          <eval>          [foo] (g2 (exn) (printf ">>> Aborting
> process at time ~S:~%    Error: ~S" g0 ((condition-property-
> accessor......
>          <eval>          [foo] (exn)     <--
>

Hi, Rick!

Thanks for the thorough description. Note the "<eval>" in the backtrace -
this code is evaluated (and not executed as compiled code). Somehow it
seems your are loading and evaluating code at runtime.

To avoid increasing the memory footprint for evaluated code (and assuming
that "eval" is usually not needed in compiled code), only a minimal
set of macros is available when doing "eval" or "load" of source code.
"condition-case" is an extension. Evaluate (!) the following in your
(compiled code) to load the extended macros into your evaluation
environment:

(require-extension chicken-more-macros)


cheers,
felix




reply via email to

[Prev in Thread] Current Thread [Next in Thread]