Merge pull request #630 from antmicro/segmatch-warning

segmatch: added warning for missing files
This commit is contained in:
litghost 2019-02-08 10:00:59 -08:00 committed by GitHub
commit 22f4ef6307
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -235,6 +235,12 @@ int main(int argc, char** argv) {
printf("Reading %s.\n", argv[optind]);
std::ifstream f;
f.open(argv[optind]);
// Check if input file exists.
if (!f.good()) {
printf("WARNING: Input file does not exist!\n");
}
assert(!f.fail());
read_input(f, argv[optind]);
}