From f6445615b0b81a83ef75cc4774bac992bac234bb Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Mon, 17 Mar 2014 04:55:19 +0100 Subject: [PATCH] Got rid of useless "internal error code" part of error exit messages. --- TODO | 2 -- src/common/rexit.c | 4 +--- src/common/rexit.h | 5 ++--- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/TODO b/TODO index 4c9b894..225a210 100644 --- a/TODO +++ b/TODO @@ -9,8 +9,6 @@ BOTH SERVER/CLIENT: - make config files format more readable / self-explanatory -- get rid of the useless "internal error code" in error messages - SERVER: - implement field of view / line of sight and obstacles for those on the map diff --git a/src/common/rexit.c b/src/common/rexit.c index 7b837e9..facf63f 100644 --- a/src/common/rexit.c +++ b/src/common/rexit.c @@ -31,9 +31,7 @@ extern void exit_err(int err, char * msg) { msg = "Details unknown."; } - printf("Aborted program due to error. %s\n" - "Internal error code: %d\n", - msg, err); + printf("Aborted program due to error. %s\n", msg); if (0 != errno) { perror("errno states"); diff --git a/src/common/rexit.h b/src/common/rexit.h index 3095cf8..15c39b9 100644 --- a/src/common/rexit.h +++ b/src/common/rexit.h @@ -13,9 +13,8 @@ extern void set_cleanup_func(void (* f)()); /* If "err" == 0, do nothing. Else, clean up and exit with an error message that - * consists, first, of "msg" or (if "msg" is a NULL pointer) a generic "Details - * unknown", secondly of "err" as the "internal error code", and thirdly of - * errno if it is non-zero. + * consists of "msg" or (if "msg" is NULL pointer) a generic "Details unknown" + * and of errno's content (if it is non-zero). */ extern void exit_err(int err, char * msg); -- 2.30.2