Leave a notice in the log when aborting

This commit is contained in:
thorkill 2015-07-01 19:01:42 +02:00
parent 24cea32efb
commit dca3558d05
5 changed files with 32 additions and 11 deletions

View file

@ -145,8 +145,10 @@ static void sssp_bfs(void) {
for list_each(node_t, n, todo_list) { /* "n" is the node from which we start */
logger(DEBUG_SCARY_THINGS, LOG_DEBUG, " Examining edges from %s", n->name);
if(n->distance < 0)
if(n->distance < 0) {
logger(DEBUG_ALWAYS, LOG_ERR, "sssp_bfs(): n->distance < 0. aborting!");
abort();
}
for splay_each(edge_t, e, n->edge_tree) { /* "e" is the edge connected to "from" */
if(!e->reverse)