X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ferror-error.lisp;h=5d3be6f1b4f8a640428ac3b7cc114f101316479f;hb=906ecd4ef2d10aca23e1081f03c13fe2f932ed89;hp=992b13e231bc5bad1218690f9aca7866a6f4075d;hpb=64f013aaf9d09edb2d82cb7eed6cb098bbbc169a;p=sbcl.git diff --git a/src/code/error-error.lisp b/src/code/error-error.lisp index 992b13e..5d3be6f 100644 --- a/src/code/error-error.lisp +++ b/src/code/error-error.lisp @@ -12,24 +12,17 @@ ;;; These specials are used by ERROR-ERROR to track the success of recovery ;;; attempts. (defvar *error-error-depth* 0) -(defvar *error-throw-up-count* 0) ;;; ERROR-ERROR can be called when the error system is in trouble and needs to ;;; punt fast. It prints a message without using FORMAT. If we get into this ;;; recursively, then we halt. (defun error-error (&rest messages) (let ((*error-error-depth* (1+ *error-error-depth*))) - (when (> *error-throw-up-count* 50) - (/show0 "*ERROR-THROW-UP-COUNT* too big, trying HALT") - (%primitive sb!c:halt) - (/show0 "*ERROR-THROW-UP-COUNT* too big, trying THROW") - (throw 'toplevel-catcher nil)) (case *error-error-depth* (1) (2 (stream-cold-init-or-reset)) (3 - (incf *error-throw-up-count*) (/show0 "*ERROR-ERROR-DEPTH* too big, trying THROW") (throw 'toplevel-catcher nil)) (t @@ -40,6 +33,12 @@ (with-standard-io-syntax (let ((*print-readably* nil)) - (dolist (item messages) - (princ item *terminal-io*)) - (sb!debug:internal-debug))))) + (dolist (item messages) + (princ item *terminal-io*)) + (terpri *terminal-io*) + (sb!debug:backtrace most-positive-fixnum *terminal-io*) + (force-output *terminal-io*) + (invoke-debugger + (coerce-to-condition "Maximum error nesting depth exceeded" nil + 'simple-error + 'error))))))