[Freeciv-Dev] Re: (PR#6377) Unexplicit error message in cm.c
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Remi Bonnet wrote:
> Although i don't think this part of the code maybe reached, the error
> message is not really explicit.
I think this is a code error; please use die().
If it is a user error rather than a code error, the string should be
more informative and should be translated.
jason
> ------------------------------------------------------------------------
>
> --- ../freeciv/common/aicore/cm.c 2003-10-02 15:11:11.000000000 +0200
> +++ ./common/aicore/cm.c 2003-10-02 18:12:47.000000000 +0200
> @@ -1509,8 +1509,8 @@
> case SCIENCE:
> return _("Science");
> default:
> - assert(0);
> - return "ERROR";
> + freelog(LOG_FATAL, "Unknown stat value in cm_get_stat_name: %d", stat);
> + exit(EXIT_FAILURE);
> }
> }
>
|
|