#include <iostream>
#include "db/connection.h"
+#include "common/audit/logger.h"
#include "common/exception.h"
namespace Csr {
void Connection::transactionBegin()
{
- ::sqlite3_exec(m_handle, "BEGIN TRANSACTION;", 0, 0, 0);
+ if (::sqlite3_exec(m_handle, "BEGIN TRANSACTION;", 0, 0, 0) != SQLITE_OK)
+ ERROR("Failed to begine transaction: " << getErrorMessage());
}
void Connection::transactionEnd()
{
- ::sqlite3_exec(m_handle, "END TRANSACTION;", 0, 0, 0);
+ if (::sqlite3_exec(m_handle, "END TRANSACTION;", 0, 0, 0) != SQLITE_OK)
+ ERROR("Failed to end transaction: " << getErrorMessage());
}
} // namespace Db
} // namespace Csr