Paul McGuire wrote:
...
try:
open database
do database stuff
except DatabaseException, de:
log exception
throw
finally:
close database
Or
try:
transaction = new database transaction
do database stuff
do more database stuff
commit transaction
transaction = None
except DatabaseException, de:
log exception
throw
finally:
if transaction:
rollback transaction
Generally it is a good idea to try the advice you are about to offer.
"raise" is the Python way to do the Lisp/Scheme "throw" which will
likely produce another error, but not the one you want.
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list