Commit b47ca4cb authored by Mike Kremer's avatar Mike Kremer

Added good() check to readFile()

git-svn-id: http://www.openvolumemesh.org/svnrepo/OpenVolumeMesh/trunk@42 66977474-1d4b-4f09-8fe9-267525286df2
parent 1f6fb82e
......@@ -80,6 +80,12 @@ bool FileManager::readFile(const std::string& _filename, MeshT& _mesh,
std::ifstream iff(_filename.c_str(), std::ios::in);
if(!iff.good()) {
std::cerr << "Error: Could not open file " << _filename << " for reading!" << std::endl;
iff.close();
return false;
}
std::string s;
// read header
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment