This commit is contained in:
Alexey Milovidov 2021-07-10 10:12:18 +03:00
parent 7a1a184c48
commit a6d0cda7c1
2 changed files with 3 additions and 3 deletions

View File

@ -32,7 +32,7 @@ XML substitution example:
<profiles from_zk="/profiles-in-zookeeper" /> <profiles from_zk="/profiles-in-zookeeper" />
<users> <users>
<!-- Replaces `include` element with hte subtree found at `/users-in-zookeeper` ZK path. --> <!-- Replaces `include` element with the subtree found at `/users-in-zookeeper` ZK path. -->
<include from_zk="/users-in-zookeeper" /> <include from_zk="/users-in-zookeeper" />
<include from_zk="/other-users-in-zookeeper" /> <include from_zk="/other-users-in-zookeeper" />
</users> </users>

View File

@ -302,14 +302,14 @@ void ConfigProcessor::doIncludesRecursive(
} }
if (substs_count > 1) /// only one substitution is allowed if (substs_count > 1) /// only one substitution is allowed
throw Poco::Exception("several substitutions attributes set for element <" + node->nodeName() + ">"); throw Poco::Exception("More than one substitution attribute is set for element <" + node->nodeName() + ">");
if (node->nodeName() == "include") if (node->nodeName() == "include")
{ {
if (node->hasChildNodes()) if (node->hasChildNodes())
throw Poco::Exception("<include> element must have no children"); throw Poco::Exception("<include> element must have no children");
if (substs_count == 0) if (substs_count == 0)
throw Poco::Exception("no substitution attributes set for element <include>, must have one"); throw Poco::Exception("No substitution attributes set for element <include>, must have exactly one");
} }
/// Replace the original contents, not add to it. /// Replace the original contents, not add to it.