Complete.Org: Mailing Lists: Archives: freeciv-ai: August 2004:
[freeciv-ai] Re: [Freeciv-Dev] (PR#9886) better AI unit assert
Home

[freeciv-ai] Re: [Freeciv-Dev] (PR#9886) better AI unit assert

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [freeciv-ai] Re: [Freeciv-Dev] (PR#9886) better AI unit assert
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Tue, 31 Aug 2004 15:52:11 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=9886 >

On Tue, 31 Aug 2004, Jason Short wrote:
> Per I. Mathisen wrote:
> > This patch adds new function ai_assert_unit() which replaces assert(). It
> > improves on the latter by outputting more data before aborting. In
> > particular, if DEBUG is compiled in, we remember which function and what
> > line we set the unit's role, so that we can see where role errors start.
>
> But can't you get this information from the backtrace anyway?

Err, no. That's the _point_. The role is usually set much earlier than the
assert. Sometimes in the turn before or several turns earlier (for
diplomats).

  - Per




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