mirror of https://github.com/Icinga/icinga2.git
Improve error messages on Endpoint not belonging to a zone or multiple zones
fixes #8372
This commit is contained in:
parent
bb2338631f
commit
289ca2ec24
|
@ -46,14 +46,14 @@ void Endpoint::OnAllConfigLoaded(void)
|
|||
|
||||
if (members.find(this) != members.end()) {
|
||||
if (m_Zone)
|
||||
BOOST_THROW_EXCEPTION(std::runtime_error("Endpoint '" + GetName() + "' is in more than one zone."));
|
||||
BOOST_THROW_EXCEPTION(ScriptError("Endpoint '" + GetName() + "' is in more than one zone.", GetDebugInfo()));
|
||||
|
||||
m_Zone = zone;
|
||||
}
|
||||
}
|
||||
|
||||
if (!m_Zone)
|
||||
BOOST_THROW_EXCEPTION(std::runtime_error("Endpoint '" + GetName() + "' does not belong to a zone."));
|
||||
BOOST_THROW_EXCEPTION(ScriptError("Endpoint '" + GetName() + "' does not belong to a zone.", GetDebugInfo()));
|
||||
}
|
||||
|
||||
void Endpoint::AddClient(const ApiClient::Ptr& client)
|
||||
|
|
Loading…
Reference in New Issue