Improve exception message text

This commit is contained in:
Roman Vasin 2023-07-21 13:29:40 +00:00
parent 0aed62ec73
commit 10ec069175
2 changed files with 2 additions and 2 deletions

View File

@ -232,7 +232,7 @@ void ConfigProcessor::decryptRecursive(Poco::XML::Node * config_root)
{
const NodeListPtr children = element.childNodes();
if (children->length() != 1)
throw Exception(ErrorCodes::BAD_ARGUMENTS, "Encrypted node {} should have only one text node", node->nodeName());
throw Exception(ErrorCodes::BAD_ARGUMENTS, "Encrypted node {} cannot contain nested elements", node->nodeName());
Node * text_node = node->firstChild();
if (text_node->nodeType() != Node::TEXT_NODE)

View File

@ -33,4 +33,4 @@ def test_no_encryption_key():
def test_subnodes():
start_clickhouse("configs/config_subnodes.xml", "should have only one text node")
start_clickhouse("configs/config_subnodes.xml", "cannot contain nested elements")