From fd043e830623dc8d5bb88d7d7dfd4c72b3203662 Mon Sep 17 00:00:00 2001
From: Daniel <d.hornung@indiscale.com>
Date: Mon, 27 Sep 2021 14:29:05 +0200
Subject: [PATCH] DOC: A few comments in code.

---
 include/caosdb/entity.h                      | 9 +++++++++
 src/caosdb/file_transmission/file_reader.cpp | 2 +-
 src/caosdb/transaction.cpp                   | 2 +-
 3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/include/caosdb/entity.h b/include/caosdb/entity.h
index 6de939c..8aea41b 100644
--- a/include/caosdb/entity.h
+++ b/include/caosdb/entity.h
@@ -348,6 +348,9 @@ private:
   inline Messages() : RepeatedPtrFieldWrapper(){};
 };
 
+///////////////////////////////////////////////////////////////////////////////
+// class Parent ///////////////////////////////////////////////////////////////
+
 /**
  * Parent of an Entity.
  *
@@ -436,6 +439,9 @@ private:
     : RepeatedPtrFieldWrapper(wrapped){};
 };
 
+///////////////////////////////////////////////////////////////////////////////
+// class Property /////////////////////////////////////////////////////////////
+
 /**
  * Property of an Entity.
  *
@@ -615,6 +621,9 @@ private:
     : RepeatedPtrFieldWrapper<Property, ProtoProperty>(wrapped){};
 };
 
+///////////////////////////////////////////////////////////////////////////////
+// class Entity ///////////////////////////////////////////////////////////////
+
 /**
  * Entity is the central and basic data object of CaosDB.
  *
diff --git a/src/caosdb/file_transmission/file_reader.cpp b/src/caosdb/file_transmission/file_reader.cpp
index 1a78e5a..e40e646 100644
--- a/src/caosdb/file_transmission/file_reader.cpp
+++ b/src/caosdb/file_transmission/file_reader.cpp
@@ -79,7 +79,7 @@ std::size_t FileReader::read(std::string &buffer) {
     if (bufferSize > 0) {
       // TODO(henrik): fix nolint
       if (!stream_.read(&buffer[0], bufferSize)) { // NOLINT
-        throw FileIOError("Can't read file: " + filename_.string());
+        throw FileIOError("Can't read data from file: " + filename_.string());
       }
 
       bytesRead = static_cast<std::size_t>(stream_.gcount());
diff --git a/src/caosdb/transaction.cpp b/src/caosdb/transaction.cpp
index 6380dcd..8cceb7a 100644
--- a/src/caosdb/transaction.cpp
+++ b/src/caosdb/transaction.cpp
@@ -344,7 +344,7 @@ auto Transaction::WaitForIt() const noexcept -> TransactionStatus { // NOLINT
     default:
       CAOSDB_LOG_FATAL(logger_name) << "Received invalid TransactionResponseCase.";
       break;
-    }
+    } // default to sub_response.transaction_response_case()
     if (result != nullptr) {
       if (result->HasErrors()) {
         set_error = true;
-- 
GitLab