From 2f6b489ec20b5879d0ed66a7d08d341658ad8b7d Mon Sep 17 00:00:00 2001 From: Pavel Kartavyy Date: Wed, 21 Sep 2016 16:30:27 +0300 Subject: [PATCH] daemon: add comments --- libs/libdaemon/include/daemon/BaseDaemon.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/libdaemon/include/daemon/BaseDaemon.h b/libs/libdaemon/include/daemon/BaseDaemon.h index 8474bdff459..40f7f2bb473 100644 --- a/libs/libdaemon/include/daemon/BaseDaemon.h +++ b/libs/libdaemon/include/daemon/BaseDaemon.h @@ -91,6 +91,7 @@ public: return dynamic_cast(Poco::Util::Application::instance()); } + /// return none if daemon doesn't exist, reference to the daemon otherwise static boost::optional tryGetInstance() { return tryGetInstance(); } /// Спит заданное количество секунд или до события wakeup @@ -211,6 +212,7 @@ boost::optional BaseDaemon::tryGetInstance() } catch (const Poco::NullPointerException &) { + /// if daemon doesn't exist than instance() throw NullPointerException } if (ptr)