]> Shamusworld >> Repos - rmac/commitdiff
Added more descriptive names for internal errors. Thanks to Jean-Paul Mari for the...
authorggn <ggn@atari.org>
Sun, 17 Oct 2021 09:10:32 +0000 (12:10 +0300)
committerShamus Hammons <jlhamm@acm.org>
Sat, 30 Oct 2021 15:20:15 +0000 (10:20 -0500)
error.c

diff --git a/error.c b/error.c
index 6945fc458e408afd476e6e4e3a6d307e28a98805..2a3df9671ceea479b0620131128711cd3783c1ca 100644 (file)
--- a/error.c
+++ b/error.c
 #include <stdarg.h>
 #include <token.h>
 #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);