From: Holger Schemel Date: Fri, 17 Oct 2014 22:16:20 +0000 (+0200) Subject: fixed logging fatal errors X-Git-Tag: 4.0.0.0-rc1~327 X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=commitdiff_plain;h=2755bae650b89e72250cb11161ac210d18d39474 fixed logging fatal errors --- diff --git a/src/conftime.h b/src/conftime.h index a3077953..ed346741 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "2014-10-17 19:07" +#define COMPILE_DATE_STRING "2014-10-18 00:15" diff --git a/src/init.c b/src/init.c index 5cd9f8d5..39f5c347 100644 --- a/src/init.c +++ b/src/init.c @@ -1315,7 +1315,7 @@ static void set_cloned_graphic_parameters(int graphic) Error(ERR_INFO, "custom graphic rejected for this element/action"); if (graphic == fallback_graphic) - Error(ERR_EXIT, "fatal error: no fallback graphic available"); + Error(ERR_EXIT, "no fallback graphic available"); Error(ERR_INFO, "fallback done to 'char_exclam' for this graphic"); Error(ERR_INFO_LINE, "-"); @@ -1461,7 +1461,7 @@ static void InitGraphicInfo() Error(ERR_INFO, "custom graphic rejected for this element/action"); if (i == fallback_graphic) - Error(ERR_EXIT, "fatal error: no fallback graphic available"); + Error(ERR_EXIT, "no fallback graphic available"); Error(ERR_INFO, "fallback done to 'char_exclam' for this graphic"); Error(ERR_INFO_LINE, "-"); @@ -1490,7 +1490,7 @@ static void InitGraphicInfo() Error(ERR_INFO, "custom graphic rejected for this element/action"); if (i == fallback_graphic) - Error(ERR_EXIT, "fatal error: no fallback graphic available"); + Error(ERR_EXIT, "no fallback graphic available"); Error(ERR_INFO, "fallback done to 'char_exclam' for this graphic"); Error(ERR_INFO_LINE, "-"); diff --git a/src/libgame/misc.c b/src/libgame/misc.c index 31adce34..eb2f8f0c 100644 --- a/src/libgame/misc.c +++ b/src/libgame/misc.c @@ -1005,6 +1005,9 @@ void Error(int mode, char *format, ...) if (mode & ERR_WARN) fprintf_nonewline(program.error_file, "warning: "); + if (mode & ERR_EXIT) + fprintf_nonewline(program.error_file, "fatal error: "); + va_start(ap, format); vfprintf_newline(program.error_file, format, ap); va_end(ap);