mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-27 07:34:15 +02:00
Check for invalid value type.
This commit is contained in:
parent
84fcf24fa3
commit
bac7495f49
@ -83,6 +83,8 @@ Value::operator String(void) const
|
|||||||
case ValueObject:
|
case ValueObject:
|
||||||
object = boost::get<Object::Ptr>(m_Value).get();
|
object = boost::get<Object::Ptr>(m_Value).get();
|
||||||
return "Object of type '" + Utility::GetTypeName(typeid(*object)) + "'";
|
return "Object of type '" + Utility::GetTypeName(typeid(*object)) + "'";
|
||||||
|
default:
|
||||||
|
BOOST_THROW_EXCEPTION(runtime_error("Unknown value type."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user