Ejemplo n.º 1
0
Value ScriptVariable::Get(const String& name)
{
	ScriptVariable::Ptr sv = GetByName(name);

	if (!sv)
		BOOST_THROW_EXCEPTION(std::invalid_argument("Tried to access undefined script variable '" + name + "'"));

	return sv->GetData();
}
Ejemplo n.º 2
0
Value ScriptVariable::Get(const String& name)
{
	ScriptVariable::Ptr sv = GetByName(name);

	if (!sv) {
		Log(LogWarning, "icinga", "Tried to access undefined variable: " + name);
		return Empty;
	}

	return sv->GetData();
}