From 8963d7d2207a2c31bc22d10a97f2e2ee382b6881 Mon Sep 17 00:00:00 2001 From: Juan Jose Garcia Ripoll Date: Thu, 2 Oct 2008 12:18:02 +0200 Subject: [PATCH] Differentiate between correctable and non-correctable stack overflows --- src/clos/conditions.lsp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/clos/conditions.lsp b/src/clos/conditions.lsp index 077e3a478..eb7adb484 100644 --- a/src/clos/conditions.lsp +++ b/src/clos/conditions.lsp @@ -540,12 +540,14 @@ returns with NIL." (type :initarg :type :initform nil :reader ext:stack-overflow-type)) (:REPORT (lambda (condition stream) - (let ((type (ext::stack-overflow-type condition))) - (if (eq type 'ext:c-stack) - (format stream "Machine stack overflow. Stack cannot grow any further. Either exit -or return to an outer frame, undoing all the function calls so far.") + (let* ((type (ext::stack-overflow-type condition)) + (size (ext::stack-overflow-size condition))) + (if size (format stream "~A overflow at size ~D. Stack can probably be resized." - type (ext:stack-overflow-size condition))))))) + type size) + (format stream "~A stack overflow. Stack cannot grow any further. Either exit +or return to an outer frame, undoing all the function calls so far." + type)))))) (define-condition storage-exhausted (storage-condition) ())