[ZODB-Dev] misleading exception

Dieter Maurer dieter at handshake.de
Sun Nov 6 04:10:31 EST 2005


dvd wrote at 2005-11-4 17:49 +0100:
> ... some weird code ...
>If I decomment the following line
>#transaction.get().abort()
>
>all works fine.

As a general rule: you *MUST* abort/commit before you close the connection.

>The strange is that the exception is raised when i try to commit the
>transaction in the second call of CreateDatabase
>
>If i omit the savepoint rollback *and* the abort line I obtain a
>meaningful error:
>
>ZODB.POSException.ConnectionStateError: Cannot close a connection joined
>to a transaction
>
>Maybe this report can help someone

You should file a bug report: "http://www.zope.org/Collectors/Zope",
category "database". This way, Tim can fix the hole in the
"ConnectionStateError" check.

-- 
Dieter


More information about the ZODB-Dev mailing list