mysqlxx transaction exception safety

Fix terminate on exception and rollback query fail.
This commit is contained in:
blazerer 2017-08-16 17:51:54 +03:00 committed by alexey-milovidov
parent c629799500
commit a11759c75b

View File

@ -22,8 +22,14 @@ public:
virtual ~Transaction()
{
if (!finished)
rollback();
try
{
if (!finished)
rollback();
}
catch (...)
{
}
}
void commit()