better error messages

This commit is contained in:
Ken Martin 2001-11-26 11:31:50 -05:00
parent c9b6e9f5f8
commit 03e7f324f0
1 changed files with 10 additions and 2 deletions

View File

@ -65,8 +65,16 @@ ShouldRemove(const char *name, const std::vector<std::string> &args,
void cmIfFunctionBlocker:: void cmIfFunctionBlocker::
ScopeEnded(cmMakefile &mf) ScopeEnded(cmMakefile &mf)
{ {
cmSystemTools::Error("The end of a CMakeLists file was reached with an IF statement that was not closed properly. Within the directory: ", std::string errmsg = "The end of a CMakeLists file was reached with an IF statement that was not closed properly.\nWithin the directory: ";
mf.GetCurrentDirectory()); errmsg += mf.GetCurrentDirectory();
errmsg += "\nThe arguments are: ";
for(std::vector<std::string>::const_iterator j = m_Args.begin();
j != m_Args.end(); ++j)
{
errmsg += *j;
errmsg += " ";
}
cmSystemTools::Error(errmsg.c_str());
} }
bool cmIfCommand::InitialPass(std::vector<std::string> const& args) bool cmIfCommand::InitialPass(std::vector<std::string> const& args)