mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
MacroProcessor: Add the argument name for set_if error messages
fixes #13345
This commit is contained in:
parent
b7caf0820d
commit
b51a2c1c25
@ -512,7 +512,8 @@ Value MacroProcessor::ResolveArguments(const Value& command, const Dictionary::P
|
|||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
/* tried to convert a string */
|
/* tried to convert a string */
|
||||||
Log(LogWarning, "PluginUtility")
|
Log(LogWarning, "PluginUtility")
|
||||||
<< "Error evaluating set_if value '" << set_if_resolved << "': " << ex.what();
|
<< "Error evaluating set_if value '" << set_if_resolved
|
||||||
|
<< "' used in argument '" << arg.Key << "': " << ex.what();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -550,7 +551,8 @@ Value MacroProcessor::ResolveArguments(const Value& command, const Dictionary::P
|
|||||||
for (const CommandArgument& arg : args) {
|
for (const CommandArgument& arg : args) {
|
||||||
|
|
||||||
if (arg.AValue.IsObjectType<Dictionary>()) {
|
if (arg.AValue.IsObjectType<Dictionary>()) {
|
||||||
Log(LogWarning, "PluginUtility", "Tried to use dictionary in argument");
|
Log(LogWarning, "PluginUtility")
|
||||||
|
<< "Tried to use dictionary in argument '" << arg.Key << "'.";
|
||||||
continue;
|
continue;
|
||||||
} else if (arg.AValue.IsObjectType<Array>()) {
|
} else if (arg.AValue.IsObjectType<Array>()) {
|
||||||
bool first = true;
|
bool first = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user