]> granicus.if.org Git - icinga2/commitdiff
Improve error message on missing included config files
authorMichael Friedrich <michael.friedrich@gmail.com>
Sat, 7 Feb 2015 20:50:14 +0000 (21:50 +0100)
committerMichael Friedrich <michael.friedrich@gmail.com>
Sat, 7 Feb 2015 20:50:14 +0000 (21:50 +0100)
fixes #8179

lib/config/configcompiler.cpp

index bb3b02c3e4c9431b2b2373de6e30b360b594d027..6882065106a0331eb5ac20d85d037f4b4e1d6ce8 100644 (file)
@@ -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);