Skip to content

Commit

Permalink
improved error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
fangfufu committed Apr 26, 2019
1 parent 39820e3 commit 84f2ebc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/link.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ void Link_set_stat(Link* this_link, CURL *curl)
this_link->type = LINK_FILE;
}
} else {
fprintf(stderr, "Link_set_stat(): HTTP %ld.\n", http_resp);
this_link->type = LINK_INVALID;
}
}
Expand Down Expand Up @@ -291,9 +292,8 @@ LinkTable *LinkTable_new(const char *url)
Too Many Requests\n", url);
sleep(HTTP_429_WAIT);
} else if (http_resp != HTTP_OK) {
fprintf(stderr, "link.c: LinkTable_new(): cannot retrieve the base \
URL, URL: %s, HTTP %ld\n", url, http_resp);

fprintf(stderr, "link.c: LinkTable_new(): cannot retrieve URL: %s, \
HTTP %ld\n", url, http_resp);
LinkTable_free(linktbl);
curl_easy_cleanup(curl);
return NULL;
Expand Down

0 comments on commit 84f2ebc

Please sign in to comment.