mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-23 21:55:03 +02:00
parent
3ad233400e
commit
95bf7ca560
@ -366,6 +366,17 @@ object_declaration identifier T_STRING object_inherits_specifier expressionlist
|
|||||||
{
|
{
|
||||||
ConfigItemBuilder::Ptr item = make_shared<ConfigItemBuilder>(yylloc);
|
ConfigItemBuilder::Ptr item = make_shared<ConfigItemBuilder>(yylloc);
|
||||||
|
|
||||||
|
ConfigItem::Ptr oldItem = ConfigItem::GetObject($3, $4);
|
||||||
|
|
||||||
|
if (oldItem) {
|
||||||
|
std::ostringstream msgbuf;
|
||||||
|
msgbuf << "Object '" << $4 << "' of type '" << $3 << "' re-defined; previous definition: " << oldItem->GetDebugInfo();
|
||||||
|
free($3);
|
||||||
|
free($4);
|
||||||
|
delete $5;
|
||||||
|
BOOST_THROW_EXCEPTION(std::invalid_argument(msgbuf.str()));
|
||||||
|
}
|
||||||
|
|
||||||
item->SetType($3);
|
item->SetType($3);
|
||||||
|
|
||||||
if (strchr($4, '!') != NULL) {
|
if (strchr($4, '!') != NULL) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user