From: Michael Friedrich Date: Sat, 7 Feb 2015 19:07:34 +0000 (+0100) Subject: Improve error messages on Endpoint not belonging to a zone or multiple zones X-Git-Tag: v2.3.0~281 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=289ca2ec244754c59b1476a4ed5f7fa748779866;p=icinga2 Improve error messages on Endpoint not belonging to a zone or multiple zones fixes #8372 --- diff --git a/lib/remote/endpoint.cpp b/lib/remote/endpoint.cpp index 8ba96a3f1..85e344030 100644 --- a/lib/remote/endpoint.cpp +++ b/lib/remote/endpoint.cpp @@ -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)