ENH: add better error reporting for file open failures

This commit is contained in:
Bill Hoffman
2004-09-07 16:55:25 -04:00
parent 8f92e8c069
commit b5bdf2cb0a
14 changed files with 17 additions and 2 deletions

View File

@@ -327,9 +327,10 @@ bool cmCacheManager::SaveCache(const char* path)
tempFile += ".tmp";
std::ofstream fout(tempFile.c_str());
if(!fout)
{
{
cmSystemTools::Error("Unable to open cache file for save. ",
cacheFile.c_str());
cmSystemTools::ReportLastSystemError("");
return false;
}
// before writting the cache, update the version numbers