Skip to content
Snippets Groups Projects
Commit 06f68be9 authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

ENH: log error messages

parent bc673d29
No related branches found
No related tags found
No related merge requests found
Pipeline #12288 failed
...@@ -405,6 +405,10 @@ auto Transaction::WaitForIt() const noexcept -> TransactionStatus { // NOLINT ...@@ -405,6 +405,10 @@ auto Transaction::WaitForIt() const noexcept -> TransactionStatus { // NOLINT
find_result = std::make_unique<Entity>(&entity_response); find_result = std::make_unique<Entity>(&entity_response);
if (find_result->HasErrors()) { if (find_result->HasErrors()) {
set_error = true; set_error = true;
// log errors
for (auto &err : find_result->GetErrors()) {
CAOSDB_LOG_ERROR(logger_name) << err.GetDescription();
}
} }
entities.push_back(std::move(find_result)); entities.push_back(std::move(find_result));
} }
...@@ -443,6 +447,10 @@ auto Transaction::WaitForIt() const noexcept -> TransactionStatus { // NOLINT ...@@ -443,6 +447,10 @@ auto Transaction::WaitForIt() const noexcept -> TransactionStatus { // NOLINT
if (result != nullptr) { if (result != nullptr) {
if (result->HasErrors()) { if (result->HasErrors()) {
set_error = true; set_error = true;
// log errors
for (auto &err : result->GetErrors()) {
CAOSDB_LOG_ERROR(logger_name) << err.GetDescription();
}
} }
entities.push_back(std::move(result)); entities.push_back(std::move(result));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment