diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2001-10-02 21:28:55 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2001-10-02 21:28:55 (GMT) |
commit | 8591786867111568298394242a80ddc0a321f5ad (patch) | |
tree | dd9b0251953724c9189d6d7bc103567573dbc6a0 /Source/cmSystemTools.cxx | |
parent | c9caf2390c86b98bbeca1e4e52d04fbbb563f083 (diff) | |
download | CMake-8591786867111568298394242a80ddc0a321f5ad.zip CMake-8591786867111568298394242a80ddc0a321f5ad.tar.gz CMake-8591786867111568298394242a80ddc0a321f5ad.tar.bz2 |
ENH: add better error reports in parsing cmake files, like what file has the error
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r-- | Source/cmSystemTools.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 0e5c81e..a7df5bf 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -486,7 +486,8 @@ const char *cmSystemTools::ConvertToWindowsSlashesAndCleanUp(std::string& path) bool cmSystemTools::ParseFunction(std::ifstream& fin, std::string& name, - std::vector<std::string>& arguments) + std::vector<std::string>& arguments, + const char* filename) { name = ""; arguments = std::vector<std::string>(); @@ -551,8 +552,8 @@ bool cmSystemTools::ParseFunction(std::ifstream& fin, } else { - cmSystemTools::Error("Parse error in read function missing end )", - inbuffer); + cmSystemTools::Error("Parse error in read function missing end )\nIn File: ", + filename, "\nCurrent line:", inbuffer); return false; } } @@ -560,7 +561,8 @@ bool cmSystemTools::ParseFunction(std::ifstream& fin, } else { - cmSystemTools::Error("Parse error in read function ", inbuffer); + cmSystemTools::Error("Parse error in read function\nIn file:", + filename, "\nCurrent line:", inbuffer); return false; } } |