1.0.33.28: Display descriptions for internal errors in the runtime.
authorAlastair Bridgewater <lisphacker@users.sourceforge.net>
Mon, 21 Dec 2009 16:30:08 +0000 (16:30 +0000)
committerAlastair Bridgewater <lisphacker@users.sourceforge.net>
Mon, 21 Dec 2009 16:30:08 +0000 (16:30 +0000)
  * In genesis, output a define with the descriptions of internal
errors.

  * In interr.c, create an array with said descriptions and use it when
describing an internal error.

src/compiler/generic/genesis.lisp
src/runtime/interr.c
version.lisp-expr

index edd8074..3470516 100644 (file)
@@ -2832,7 +2832,9 @@ core and return a descriptor to it."
         (unless (eq nil (car current-error))
           (format t "#define ~A ~D~%"
                   (c-symbol-name (car current-error))
-                  i)))))
+                  i))))
+    (format t "#define INTERNAL_ERROR_NAMES \\~%~{~S~#[~:;, \\~%~]~}~%"
+            (map 'list #'cdr internal-errors)))
   (terpri)
 
   ;; I'm not really sure why this is in SB!C, since it seems
index 3b0a882..2187fd8 100644 (file)
@@ -117,6 +117,7 @@ corruption_warning_and_maybe_lose(char *fmt, ...)
 #endif
 }
 \f
+char *internal_error_descriptions[] = {INTERNAL_ERROR_NAMES};
 /* internal error handler for when the Lisp error system doesn't exist
  *
  * FIXME: Shouldn't error output go to stderr instead of stdout? (Alas,
@@ -129,7 +130,9 @@ describe_internal_error(os_context_t *context)
     int len, scoffset, sc, offset, ch;
 
     len = *ptr++;
-    printf("internal error #%d\n", *ptr++);
+    printf("internal error #%d (%s)\n", *ptr,
+           internal_error_descriptions[*ptr]);
+    ptr++;
     len--;
     while (len > 0) {
         scoffset = *ptr++;
index d9e1bc8..7c5ac2a 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.33.27"
+"1.0.33.28"