From: Christian Heller Date: Mon, 17 Mar 2014 03:55:19 +0000 (+0100) Subject: Got rid of useless "internal error code" part of error exit messages. X-Git-Tag: tce~820 X-Git-Url: https://plomlompom.com/repos/te"st.html?a=commitdiff_plain;h=f6445615b0b81a83ef75cc4774bac992bac234bb;p=plomrogue Got rid of useless "internal error code" part of error exit messages. --- 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);