Add error checking to respack

This commit is contained in:
Thomas Goyne 2012-11-01 08:08:54 -07:00
parent 08eb738de5
commit 71af4127ce

View file

@ -67,6 +67,21 @@ int main(int argc, const char *argv[]) {
std::ofstream file_cpp(argv[2]); std::ofstream file_cpp(argv[2]);
std::ofstream file_h(argv[3]); std::ofstream file_h(argv[3]);
if (!file_manifest.good()) {
std::cout << "Failed to open manifest" << std::endl;
return 1;
}
if (!file_cpp.good()) {
std::cout << "Failed to open output CPP file" << std::endl;
return 1;
}
if (!file_h.good()) {
std::cout << "Failed to open output H file" << std::endl;
return 1;
}
// If the manifest has a path use that as the base for finding files. // If the manifest has a path use that as the base for finding files.
std::string manifest(argv[1]); std::string manifest(argv[1]);
std::string path_base; std::string path_base;