From 2755bae650b89e72250cb11161ac210d18d39474 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sat, 18 Oct 2014 00:16:20 +0200 Subject: [PATCH] fixed logging fatal errors --- src/conftime.h | 2 +- src/init.c | 6 +++--- src/libgame/misc.c | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) 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); -- 2.34.1