From dc18dfea58c68ce862f72aac1315c4c251e0b0d1 Mon Sep 17 00:00:00 2001 From: ggn Date: Sun, 17 Oct 2021 12:10:32 +0300 Subject: [PATCH] Added more descriptive names for internal errors. Thanks to Jean-Paul Mari for the patch --- error.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/error.c b/error.c index 6945fc4..2a3df96 100644 --- a/error.c +++ b/error.c @@ -10,7 +10,17 @@ #include #include #include "listing.h" -#include "token.h" +char * interror_msg[] = { + "Unknown internal error", // Error not referenced, should not be displayed + "Unknown internal error", // Error not referenced, should not be displayed + "Bad MULTX entry in chrtab", // Error #2 + "Unknown internal error", // Error not referenced, should not be displayed + "Bad fixup type", // Error #4 + "Bad operator in expression stream", // Error #5 + "Can't find generated code in section", // Error #6 + "Fixup (loc) out of range" // Error #7 + "Absolute top filename found" // Error #8 +}; // Exported variables int errcnt; // Error count @@ -204,7 +214,7 @@ int interror(int n) char buf[EBUFSIZ]; err_setup(); - sprintf(buf, "%s %d: Internal error #%d\n", curfname, curlineno, n); + sprintf(buf, "%s %d: Internal error #%d: %s\n", curfname, curlineno, n, interror_msg[n]); if (listing > 0) ship_ln(buf); -- 2.37.2