← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/assert_removed into lp:widelands

 

TiborB has proposed merging lp:~widelands-dev/widelands/assert_removed into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/assert_removed/+merge/278269

This is to fix today's compilation problems. I know Tino fixed it with exit(), but here I added throw, it is better because it prints something to terminal...
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/assert_removed into lp:widelands.
=== modified file 'src/ai/defaultai.cc'
--- src/ai/defaultai.cc	2015-11-22 11:20:09 +0000
+++ src/ai/defaultai.cc	2015-11-22 20:49:42 +0000
@@ -5523,8 +5523,7 @@
 		}
 	}
 
-	assert (false);
-	exit(1);
+	throw wexception("AI internal error: nonexistent task.");
 }
 
 // This performs one "iteration" of sorting based on due_time


Follow ups