Improve error print
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 4s
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 4s
This commit is contained in:
parent
ecb0c751d8
commit
1d85ddd0e9
1 changed files with 4 additions and 1 deletions
|
@ -71,8 +71,11 @@ int main(int argc, const char **argv) {
|
|||
__attribute__((cleanup(simple_archiver_free_state)))
|
||||
SDArchiverState *state = simple_archiver_init_state(&parsed);
|
||||
|
||||
if (simple_archiver_write_all(file, state, filenames) != SDAS_SUCCESS) {
|
||||
int ret = simple_archiver_write_all(file, state, filenames);
|
||||
if (ret != SDAS_SUCCESS) {
|
||||
fprintf(stderr, "Error during writing.\n");
|
||||
char *error_str = simple_archiver_error_to_string(ret);
|
||||
fprintf(stderr, " %s\n", error_str);
|
||||
}
|
||||
fclose(file);
|
||||
} else if ((parsed.flags & 3) == 2) {
|
||||
|
|
Loading…
Reference in a new issue