mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
Supplement logical assumption assert with error message
This commit is contained in:
parent
ed996fe32f
commit
cd23c7fe0e
@ -1,3 +1,8 @@
|
||||
2014-11-22 Darshit Shah <darnir@gmail.com>
|
||||
|
||||
* hosts.c (address_list_set_faulty): Add a helpful error message for when a
|
||||
logical assumption fails
|
||||
|
||||
2014-11-22 Darshit Shah <darnir@gmail.com>
|
||||
|
||||
* cookies.c (discard_matching_cookie): Replace defensive assert with a
|
||||
|
@ -151,6 +151,13 @@ address_list_set_faulty (struct address_list *al, int index)
|
||||
"faulty" attempt is always preceded with all-faulty addresses,
|
||||
and this is how Wget uses it. */
|
||||
assert (index == al->faulty);
|
||||
if (index != al->faulty)
|
||||
{
|
||||
logprintf (LOG_ALWAYS, "index: %d\nal->faulty: %d\n", index, al->faulty);
|
||||
logprintf (LOG_ALWAYS, _("Error in handling the address list.\n"));
|
||||
logprintf (LOG_ALWAYS, _("Please report this issue to bug-wget@gnu.org\n"));
|
||||
abort();
|
||||
}
|
||||
|
||||
++al->faulty;
|
||||
if (al->faulty >= al->count)
|
||||
|
Loading…
Reference in New Issue
Block a user