From 07e85650451dc549b2dc013b8a3248a456a9c646 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Wed, 6 Feb 2013 13:25:04 +0100 Subject: [PATCH] Fixed error message for the method validator. --- lib/config/configtype.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/config/configtype.cpp b/lib/config/configtype.cpp index 0c4dfadc4..1d9a56310 100644 --- a/lib/config/configtype.cpp +++ b/lib/config/configtype.cpp @@ -184,10 +184,16 @@ void ConfigType::ValidateMethods(const ScriptTask::Ptr& task, Dictionary::Ptr attrs = arguments[1]; String key; - BOOST_FOREACH(tie(key, tuples::ignore), attrs) { - if (!ScriptFunction::GetByName(key)) { + Value value; + BOOST_FOREACH(tie(key, value), attrs) { + if (!value.IsScalar()) + continue; + + String method = value; + + if (!ScriptFunction::GetByName(method)) { ConfigCompilerContext::GetContext()->AddError(false, "Validation failed for " + - location + ": Method '" + key + "' not found."); + location + ": Script function '" + method + "' not found."); } } -- 2.40.0