Improve error messages on Endpoint not belonging to a zone or multiple zones

fixes #8372
This commit is contained in:
Michael Friedrich 2015-02-07 20:07:34 +01:00
parent bb2338631f
commit 289ca2ec24
1 changed files with 2 additions and 2 deletions

View File

@ -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)