diff --git a/BaseLib/DateTools.cpp b/BaseLib/DateTools.cpp index 973244a4307776fae32c6389661930f296259dae..0c90124691f7593295b6c897f0d4c0e78d128073 100644 --- a/BaseLib/DateTools.cpp +++ b/BaseLib/DateTools.cpp @@ -75,11 +75,15 @@ std::string date2string(double ddate) rest = rest % (y * 10000); auto m = static_cast<int>(std::floor(rest / 100.0)); if (m < 1 || m > 12) + { WARN("date2String(): month not in [1:12]."); + } rest = rest % (m * 100); int d = rest; if (d < 1 || d > 31) + { WARN("date2String(): day not in [1:31]."); + } std::string day = std::to_string(d); if (d < 10) @@ -116,10 +120,14 @@ int xmlDate2int(const std::string &s) { int d = atoi(s.substr(8,2).c_str()); if (d < 1 || d > 31) + { WARN("xmlDate2double(): day not in [1:31]."); + } int m = atoi(s.substr(5,2).c_str()); if (m < 1 || m > 12) + { WARN("xmlDate2double(): month not in [1:12]."); + } int y = atoi(s.substr(0,4).c_str()); return date2int(y, m, d); } diff --git a/BaseLib/FileTools.h b/BaseLib/FileTools.h index 7240acef54c4e12f24603c4dfdcc6ddd080a94ce..4f47d5b1d0d3361e68c3e20764f43544d5ba5879 100644 --- a/BaseLib/FileTools.h +++ b/BaseLib/FileTools.h @@ -101,7 +101,9 @@ std::vector<T> readBinaryArray(std::string const& filename, std::size_t const n) result.size()); if (!in.eof()) + { ERR("EOF reached.\n"); + } return std::vector<T>(); } diff --git a/BaseLib/IO/XmlIO/Qt/XMLQtInterface.cpp b/BaseLib/IO/XmlIO/Qt/XMLQtInterface.cpp index 95ed78d9f9450dcd09b6ca7bc4e6e838327535a1..702d446337bae7935d20bafe89baf1aa42d483b2 100644 --- a/BaseLib/IO/XmlIO/Qt/XMLQtInterface.cpp +++ b/BaseLib/IO/XmlIO/Qt/XMLQtInterface.cpp @@ -125,7 +125,9 @@ bool XMLQtInterface::checkHash() const INFO("File is valid, hashfile written."); } else + { WARN("File is valid but could not write hashfile!"); + } return true; } } // namespace IO