diff --git a/libs/libcommon/src/daemon.cpp b/libs/libcommon/src/daemon.cpp index a4dfe8fd9e1..3846937ba2b 100644 --- a/libs/libcommon/src/daemon.cpp +++ b/libs/libcommon/src/daemon.cpp @@ -10,7 +10,6 @@ #include #include - #include #include #include @@ -28,10 +27,11 @@ #include #include #include - +#include #include "revision.h" + using Poco::Logger; using Poco::AutoPtr; using Poco::Observer; @@ -209,11 +209,11 @@ void Daemon::initialize(Application& self) /// В случае падения - сохраняем коры { struct rlimit rlim; - int res = getrlimit(RLIMIT_CORE, &rlim); - assert(!res); + if (getrlimit(RLIMIT_CORE, &rlim)) + throw Poco::Exception("Cannot getrlimit"); rlim.rlim_cur = RLIM_INFINITY; - res = setrlimit(RLIMIT_CORE, &rlim); - assert(!res); + if (setrlimit(RLIMIT_CORE, &rlim)) + throw Poco::Exception("Cannot setrlimit"); } // Сбросим генератор случайных чисел @@ -236,7 +236,7 @@ void Daemon::initialize(Application& self) Poco::ErrorHandler::set(new Yandex::KillingErrorHandler()); // Выведем ревизию демона - Logger::root().information("Starting daemon with svn revision " + Yandex::to_string(SVN_REVISION)); + Logger::root().information("Starting daemon with svn revision " + Poco::NumberFormatter::format(SVN_REVISION)); } void Daemon::uninitialize() diff --git a/libs/libmysqlxx/include/mysqlxx/Query.h b/libs/libmysqlxx/include/mysqlxx/Query.h index 06de4aaebe2..24599b86358 100644 --- a/libs/libmysqlxx/include/mysqlxx/Query.h +++ b/libs/libmysqlxx/include/mysqlxx/Query.h @@ -1,6 +1,7 @@ #ifndef MYSQLXX_QUERY_H #define MYSQLXX_QUERY_H +#include #include #include