add transaction field error in exception

This commit is contained in:
chatlanin 2024-07-09 10:00:42 +03:00
parent 6aa693c58e
commit c26089afd6

View File

@ -42,7 +42,12 @@ namespace hack
}
template<typename Transaction>
void transaction(Transaction& tr) { m_params["transaction"] = tr.convert_to_json(); }
void transaction(Transaction& tr)
{
m_params["transaction"] = tr.convert_to_json();
tr.m_result["status"] = "error";
tr.m_result["result"] = m_message;
}
template<typename Database>
void commit(const std::filesystem::path file_name = DEF_FILE_NAME(), std::string line = DEF_LINE())