added a message to indicate failure.

This commit is contained in:
John Hsu 2011-04-25 17:20:25 -07:00
parent 19bf8c222c
commit fc46a275de
1 changed files with 5 additions and 1 deletions

View File

@ -422,8 +422,12 @@ bool Mesh::fileExists(std::string filename)
fullname = package_path + fullname; fullname = package_path + fullname;
} }
std::ifstream fin; fin.open(fullname.c_str(), std::ios::in); fin.close(); std::ifstream fin; fin.open(fullname.c_str(), std::ios::in); fin.close();
if (fin.fail()) if (fin.fail()) {
ROS_FATAL("Mesh [%s] does not exist",filename.c_str());
return false; return false;
}
return true; return true;
} }