Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2003:
[Freeciv-Dev] (PR#6380) remove is_real and is_valid sanity variables
Home

[Freeciv-Dev] (PR#6380) remove is_real and is_valid sanity variables

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#6380) remove is_real and is_valid sanity variables
From: "John Wheeler" <jdwheeler42@xxxxxxxxx>
Date: Mon, 6 Oct 2003 19:09:24 -0700
Reply-to: rt@xxxxxxxxxxxxxx

[jdorje - Fri Oct  3 19:32:07 2003]:

> John Wheeler wrote:
> > Hmm... for a quick solution, would "assert(normalize_map_pos(&x, &y);" 
> > work?
> 
> No, it absolutely would not.  Anything include in the assertion is not 
> compiled at all if debugging is not used.

Interesting... I had no idea that was the case.  That could be useful
behavior to exploit, instead of having stuff like #define IS_DEVEL_VERSION.

> Although I'm not sure what you have against assert?  It tells you what 
> line the failure is on, which allows it to be easily tracked down.

My main problem is that generic errors like assert(0) lead to poor RT
tickets (once code is committed to CVS).  If someone puts something like
"assert(0)" or "core dump" in the subject line, it is much less useful
in searching for related problems.  And, if the problem is not solved
right away, the line numbers can change, making the previously reported
error message even more nebulous.

-- 

++JohnWheeler


[Prev in Thread] Current Thread [Next in Thread]