generated from Sithas/conan_template
Post Diary
This commit is contained in:
@@ -90,15 +90,19 @@ public:
|
||||
|
||||
try
|
||||
{
|
||||
session_.startTransaction();
|
||||
diaries_dao_->СreateDiary(user_uuid, dto);
|
||||
session_.commit();
|
||||
}
|
||||
catch (const mysqlx::Error& e)
|
||||
{
|
||||
session_.rollback();
|
||||
BOOST_LOG_TRIVIAL(error) << "MySQL Error: " << e.what();
|
||||
throw session_exception(http::status::internal_server_error, "Internal Server Error");
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
session_.rollback();
|
||||
BOOST_LOG_TRIVIAL(error) << "Unexpected Error: " << e.what();
|
||||
throw session_exception(http::status::internal_server_error, "Internal Server Error");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user