Add error message for missing imports (and possibly other errors)

fixes #7331
This commit is contained in:
Gunnar Beutner 2014-10-01 15:13:11 +01:00
parent 954debf235
commit a08f4588eb

View File

@ -268,7 +268,14 @@ void ConfigItem::ValidateItem(void)
return;
}
ctype->ValidateItem(GetSelf());
try {
ctype->ValidateItem(GetSelf());
} catch (const ConfigError& ex) {
const DebugInfo *di = boost::get_error_info<errinfo_debuginfo>(ex);
ConfigCompilerContext::GetInstance()->AddMessage(true, ex.what(), di ? *di : DebugInfo());
} catch (const std::exception& ex) {
ConfigCompilerContext::GetInstance()->AddMessage(true, DiagnosticInformation(ex));
}
m_Validated = true;
}