chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] srfi-18 and dynamic wind problem


From: Hans Bulfone
Subject: Re: [Chicken-users] srfi-18 and dynamic wind problem
Date: Mon, 7 Apr 2008 03:24:21 +0200
User-agent: Mutt/1.5.16 (2007-06-09)

hi,

On Sat, Apr 05, 2008 at 10:41:31PM -0600, Jim Ursetto wrote:
> (define (foo)
>   (print "start")
>   (dynamic-wind
>       noop
>       (lambda () (error "during body"))
>       (lambda () (print "during cleanup")))
>   (print "end"))
> 
> ;;; Without thread
> 
> #;1> (foo)
> start
> Error: during body
> during cleanup
> end

btw. imho the "end" shouln't be printed and on my system (with 2.732)
isn't.

i get differing behaviour:

csi, (load "test.scm") on the repl => "during cleanup" is printed
after the error is reported.

csi -script test.scm, csc => no "during cleanup"

end is never printed.

imho this makes sense.  the default exception handler just exits after
reporting the error.  csi's repl uses its own exception handler.

when end is printed this imho means that an exception handler is in
place that doesn't actually terminate the program in some way after
reporting the error but just returns.

if you add a (print) after the (error "during body"), is that invoked?

hth&bye,
hans.




reply via email to

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