Improve error printing
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 5s

This commit is contained in:
Stephen Seo 2024-07-18 15:46:27 +09:00
parent c18e772928
commit c4ff2347ff

View file

@ -83,8 +83,11 @@ int main(int argc, const char **argv) {
return 3;
}
if (simple_archiver_parse_archive_info(file, 0, NULL) != 0) {
int ret = simple_archiver_parse_archive_info(file, 0, NULL);
if (ret != 0) {
fprintf(stderr, "Error during archive checking/examining.\n");
char *error_str = simple_archiver_error_to_string(ret);
fprintf(stderr, " %s\n", error_str);
}
fclose(file);
} else if ((parsed.flags & 3) == 1) {