mirror of
https://github.com/Icinga/icinga2.git
synced 2026-05-28 04:12:13 -04:00
Warn of object name exceeds 255 characters
This commit is contained in:
parent
2e6d23701a
commit
5a4cfae182
1 changed files with 9 additions and 0 deletions
|
|
@ -96,6 +96,15 @@ ConfigItem::Ptr ConfigItemBuilder::Compile()
|
|||
<< "Object name of type '" << m_Type->GetName() << "' contains leading/trailing whitespace.\n" << oss.str();
|
||||
}
|
||||
|
||||
if (m_Name.GetLength() > 255) {
|
||||
std::ostringstream oss;
|
||||
ShowCodeLocation(oss, m_DebugInfo, false);
|
||||
|
||||
Log(LogWarning, "config")
|
||||
<< "Object name of type '" << m_Type->GetName() << "' is too long (length: " << m_Name.GetLength()
|
||||
<< ", max: 255).\n" << oss.str();
|
||||
}
|
||||
|
||||
std::vector<std::unique_ptr<Expression> > exprs;
|
||||
|
||||
Array::Ptr templateArray = new Array({ m_Name });
|
||||
|
|
|
|||
Loading…
Reference in a new issue