Print an error if report file can't be opened for writing.

This commit is contained in:
Tom Hacohen 2013-06-12 15:15:02 +01:00
parent 2d5cc83ed5
commit b5523094af
1 changed files with 40 additions and 33 deletions

View File

@ -180,6 +180,8 @@ main(int argc, char *argv[])
"%s/%s/errors.html",
exactness_config.dest_dir, CURRENT_SUBDIR);
report_file = fopen(report_filename, "w+");
if (report_file)
{
printf("%s %p\n", report_filename, report_file);
fprintf(report_file,
"<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">"
@ -222,6 +224,11 @@ main(int argc, char *argv[])
printf("Report html: %s\n", report_filename);
ret = 1;
}
else
{
perror("Failed opening report file");
}
}
list_file_free(test_list);
end: