On 4/5/08, Jim Ursetto <[EMAIL PROTECTED]> wrote:
> I'm seeing some odd behavior when using dynamic-wind within a thread.
> If an error occurs during the thunk, the 'after' portion is never
> called nor are any subsequent statements.

The same happens for scripts with only 1 (primordial) thread.  Erroring
inside the thunk immediately aborts without running the after part,
which is the behavior of the default exception handler.

I guess this behavior is expected.  In that case, I
believe the sqlite3 egg needs to be updated.  Both 
call-with-temporary-statements and with-transaction use a plain
dynamic wind to ensure a statement is finalized or that a transaction
is closed.  But if an exception occurs in the body, this will not occur,
and you may wedge the database or make it impossible to close it.

I have updated my copy of the sqlite3 egg to catch any exceptions
that occur within the body of the dynamic-wind and resignal them
in the after clause.  I'll most likely commit this change along
with some other stuff relating to busy handlers.



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

Reply via email to