mirror of https://github.com/Icinga/icinga2.git
parent
f74148f157
commit
a82c65692c
|
@ -76,13 +76,19 @@ void Object::InflateMutex(void)
|
||||||
m_Mutex.Inflate();
|
m_Mutex.Inflate();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Object::SetField(int, const Value&)
|
void Object::SetField(int id, const Value&)
|
||||||
{
|
{
|
||||||
|
if (id == 0)
|
||||||
|
BOOST_THROW_EXCEPTION(std::runtime_error("Prototype field cannot be set."));
|
||||||
|
else
|
||||||
BOOST_THROW_EXCEPTION(std::runtime_error("Invalid field ID."));
|
BOOST_THROW_EXCEPTION(std::runtime_error("Invalid field ID."));
|
||||||
}
|
}
|
||||||
|
|
||||||
Value Object::GetField(int) const
|
Value Object::GetField(int id) const
|
||||||
{
|
{
|
||||||
|
if (id == 0)
|
||||||
|
return Empty;
|
||||||
|
else
|
||||||
BOOST_THROW_EXCEPTION(std::runtime_error("Invalid field ID."));
|
BOOST_THROW_EXCEPTION(std::runtime_error("Invalid field ID."));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue