[gambit-list] termite exception propagation

James Long longster at gmail.com
Fri Sep 7 13:03:58 EDT 2007


The below code works for me (which is exactly the same as yours):

(define (test-exceptions)
  (with-exception-catcher
   (lambda (exception) #t)
   (lambda ()
     (spawn-link (lambda () (raise 'dying)))
     (? 5)
     #f)))

$ gsi
> (include "test-exceptions.scm")
> (test-exceptions)
#t
>

I'm on gambit 4b22 with the latest version of termite and running OS
X.  Although I can't directly help you, it may help to know that it
should work that way.

On 9/7/07, Phil Dawes <pdawes at users.sf.net> wrote:
> Hi Gambit List,
>
> (I'm not sure if this is the right forum to ask termite questions,
> apologies if not)
>
> My understanding from the termite paper is that linked processes
> propagate exceptions to exception catchers/handlers, and so I was
> expecting the following to return #t:
>
> (define (test-spawn-link)
>    (with-exception-catcher
>     (lambda (exception) #t)
>     (lambda ()
>       (spawn-link (lambda ()
>                     (raise 'dying)))
>       (? 5)
>       #f)
>     ))
>
> (init)
> (test-spawn-link)
>
> However this returns #f, indicating that the handler isn't called.
> Moreover the value of the exception is returned by the receiver (? 5).
> Am I missing something or has this behaviour changed since the paper?
>
> Also, is there anywhere else to get documentation for termite?
>
> (tested on gambit 4b22 and 4.0.0)
>
> Many thanks,
>
> Phil
>
>
>
> _______________________________________________
> Gambit-list mailing list
> Gambit-list at iro.umontreal.ca
> https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
>


-- 
James Long
Coptix, Inc.
longster at gmail.com



More information about the Gambit-list mailing list