On Aug 21, 2007, at 2:50 PM, Dabo wrote:

>  This is just to be able to attach a source example for dabo-dev  
> message:
>  http://leafe.com/archives/byMID/dabo-dev/ 
> [EMAIL PROTECTED]
>
>  It happens with:
>  Platform: GTK
>  Python Version: 2.5 on linux2
>  Dabo Version: Version 0.9a; Revision 3317
>  UI Version: 2.8.4.0 on wxGTK (gtk2)

        OK, I've looked into this, and have fixed a couple of small things,  
but one big fact remains: that *any* failed execute(), even one  
wrapped in a try/except, will generate the dbActivityLog output for  
"FAILED SQL", since that appears as the first line of the except  
block. It re-raises the exception, where the try/except block in  
dbSQLite.commitTransaction() catches it and handles it properly.

        My question to you is whether this is a problem for you. It is  
working exactly as expected, but if having those "FAILED SQL"  
messages in your logs looks wrong, I could remove the logging, but  
then you wouldn't have a log message when a query actually failed.

        There is no way to test ahead of time in SQLite as to whether a  
transaction exists or not, so the only way to deal with this is to  
wrap the call to "COMMIT" in a try/except block, as we are doing.

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/dabo-dev/[EMAIL PROTECTED]

Reply via email to