[Freeciv-Dev] (PR#6216) Assertion `punit->transported_by != -1' failed
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients: ; |
Subject: |
[Freeciv-Dev] (PR#6216) Assertion `punit->transported_by != -1' failed |
From: |
"John Wheeler" <jdwheeler42@xxxxxxxxx> |
Date: |
Mon, 22 Sep 2003 03:24:29 -0700 |
Reply-to: |
rt@xxxxxxxxxxxxxx |
[glip - Sun Sep 21 14:53:43 2003]:
> On Sat, 20 Sep 2003, John Wheeler wrote:
> In the future, please refrain from sending savegames so big. You can
> always upload it directly to RT via "Comment" command.
D'oh! :-[ Sorry about that.... I would have never sent such a big file
via email, but I did use RT -- and out of habit used the "Reply"
command. I'll give myself forty lashes with a wet noodle for that.
> > On a related note, is there a philosophical reason why there are so many
> > 'assert's used, instead of using freelog(LOG_FATAL, ... ); or is it just
> > a matter of not enough programmer time?
>
> In some parts of the code assert checks something which is assumed
> later and if not fulfilled would lead to a crash anyway. But in
> some parts it's just a bad tradition, I think.
I quite understand the need to exit the program if something gets really
screwed up, but I think it would be much easier to handle reported bugs
if the error messages were much more descriptive than assert gives.
die() is the perfect function for that; I'm not sure, but was that just
written? (LXR didn't find it in the 1.14.0 code.)
I quite understand a programmer using assert for quick debugging. While
working with a temporary copy of the code, that's fine. But, before the
patch gets committed, the error messages should be made more useful. I
have a copy of gdb, but quite frankly when I tried using it, it was much
simpler to use freelog(LOG_FATAL, ... ); (especially since in this case
the error was not otherwise fatal). Since there are so many more neat
features in CVS than 1.14.0, (and since the directions at getting a CVS
copy are so excellent,) I'll bet a lot of people playing CVS aren't
wizards at programming.
--
++JohnWheeler
|
|