Python Forum

Full Version: Database operation exception handling
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
Do commit and rollback operations on a database need their own separate and specific try-exception blocks over and above any try-block used for a modifying query?
Ta.
I don't think so.
You can put your commit or rollback inside its own 'try' block to check if it ran correctly, or you can use the same 'try' for all the transactions sequence.