[dss-commits] digitalSTROM Server branch, master, updated. 55f7a79cb023b6f54634c1f51c6ce41ea72ae310
git version control
dss-commits at forum.digitalstrom.org
Mon Jan 11 14:14:46 CET 2010
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "digitalSTROM Server".
The branch, master has been updated
via 55f7a79cb023b6f54634c1f51c6ce41ea72ae310 (commit)
from c87cf46766c06bb5ec6c92477b81b91fedfcc55b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 55f7a79cb023b6f54634c1f51c6ce41ea72ae310
Author: Johannes Winkelmann <johannes.winkelmann at aizo.com>
Date: Mon Jan 11 14:14:41 2010 +0100
loadFromXML(): return a meaningful error if config file doesn't exist
-----------------------------------------------------------------------
Changes:
diff --git a/core/propertysystem.cpp b/core/propertysystem.cpp
index 9dbe408..c93e610 100644
--- a/core/propertysystem.cpp
+++ b/core/propertysystem.cpp
@@ -41,6 +41,8 @@
#include <Poco/DOM/Element.h>
#include <Poco/SAX/InputSource.h>
+#include <boost/filesystem.hpp>
+
using Poco::XML::Document;
using Poco::XML::Attr;
using Poco::XML::Text;
@@ -72,6 +74,12 @@ namespace dss {
bool PropertySystem::loadFromXML(const std::string& _fileName,
PropertyNodePtr _rootNode) {
+ if (!boost::filesystem::exists(_fileName)) {
+ Logger::getInstance()->log(std::string("PropertySystem::loadFromXML: No such file ") + _fileName,
+ lsError);
+ return false;
+ }
+
PropertyNodePtr root = _rootNode;
if (root == NULL) {
root = getRootNode();
@@ -452,7 +460,7 @@ namespace dss {
return result;
}
} // count
-
+
int PropertyNode::size() const {
return m_ChildNodes.size();
} // size
hooks/post-receive
--
digitalSTROM Server
More information about the dss-commits
mailing list