mirror of
https://github.com/Icinga/icinga2.git
synced 2026-05-28 04:12:13 -04:00
Improve error messages on Endpoint not belonging to a zone or multiple zones
fixes #8372
This commit is contained in:
parent
bb2338631f
commit
289ca2ec24
1 changed files with 2 additions and 2 deletions
|
|
@ -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 a new issue