Liste des Groupes | Revenir à cl python |
On 2024-09-08, Lawrence D'Oliveiro <ldo@nz.invalid> wrote:>
On Sun, 8 Sep 2024 11:03:21 -0000 (UTC), Jon Ribbens wrote:>>
What if there's an exception in your exception handler? I'd put the
rollback in the 'finally' handler, so it's always called. If you've
already called 'commit' then the rollback does nothing of course.
In any DBMS worth its salt, rollback is something that happens
automatically if the transaction should fail to complete for any
reason.
>
This applies for any failure reason, up to and including a program or
system crash.
If it's a program or system crash, sure, but anything less than that -
how would the database even know, unless the program told it?
Les messages affichés proviennent d'usenet.