[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] Re: srfi-18 and dynamic wind problem
From: |
Jim Ursetto |
Subject: |
[Chicken-users] Re: srfi-18 and dynamic wind problem |
Date: |
Sun, 6 Apr 2008 20:56:21 -0600 |
On 4/5/08, Jim Ursetto <address@hidden> 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.
Re: [Chicken-users] srfi-18 and dynamic wind problem, Alaric Snell-Pym, 2008/04/07