From: Michael Friedrich Date: Sat, 7 Feb 2015 20:50:14 +0000 (+0100) Subject: Improve error message on missing included config files X-Git-Tag: v2.3.0~277 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=29093f2a2f789066c237e2e626b2dae17f44a73f;p=icinga2 Improve error message on missing included config files fixes #8179 --- diff --git a/lib/config/configcompiler.cpp b/lib/config/configcompiler.cpp index bb3b02c3e..688206510 100644 --- a/lib/config/configcompiler.cpp +++ b/lib/config/configcompiler.cpp @@ -134,8 +134,8 @@ Expression *ConfigCompiler::HandleInclude(const String& include, bool search, co if (!Utility::Glob(includePath, boost::bind(&ConfigCompiler::CollectIncludes, boost::ref(expressions), _1, m_Zone), GlobFile) && includePath.FindFirstOf("*?") == String::NPos) { std::ostringstream msgbuf; - msgbuf << "Include file '" + include + "' does not exist: " << debuginfo; - BOOST_THROW_EXCEPTION(std::invalid_argument(msgbuf.str())); + msgbuf << "Include file '" + include + "' does not exist"; + BOOST_THROW_EXCEPTION(ScriptError(msgbuf.str(), debuginfo)); } DictExpression *expr = new DictExpression(expressions);