handlers: HandlerPageEdit: Add transaction rollback on exception
Esse commit está contido em:
@ -115,6 +115,7 @@ Response HandlerPageEdit::handleRequest(PageDao &pageDao, std::string pagename,
|
|||||||
}
|
}
|
||||||
catch(const DatabaseException &e)
|
catch(const DatabaseException &e)
|
||||||
{
|
{
|
||||||
|
this->database->rollbackTransaction();
|
||||||
Logger::debug() << "Error saving revision: " << e.what();
|
Logger::debug() << "Error saving revision: " << e.what();
|
||||||
return errorResponse("Database error", "A database error occured while trying to save this revision");
|
return errorResponse("Database error", "A database error occured while trying to save this revision");
|
||||||
}
|
}
|
||||||
|
Referência em uma nova issue
Block a user