aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/interp/g-error.boot14
-rw-r--r--src/interp/sys-driver.boot5
3 files changed, 24 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 95a22bc6..2d4ce270 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2008-08-21 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * interp/g-error.boot (systemErrorHandler): New.
+ * interp/sys-driver.boot (restart): Use it.
+
2008-08-20 Gabriel Dos Reis <gdr@cs.tamu.edu>
* boot/Makefile.in (oa_boot_linkset): Tidy.
diff --git a/src/interp/g-error.boot b/src/interp/g-error.boot
index 32ed1d72..2d7747d5 100644
--- a/src/interp/g-error.boot
+++ b/src/interp/g-error.boot
@@ -194,3 +194,17 @@ throwMessage(:msg) ==
if $printMsgsToFile then sayMSG2File msg'
spadThrow()
+
+++ Error handler for Lisp systems that support Common Lisp conditions.
+++ We don't want users to get dropped into the Lisp debugger.
+systemErrorHandler c ==
+ $NeedToSignalSessionManager := true
+ $BreakMode = "validate" =>
+ systemError ERROR_-FORMAT('"~a",[c])
+ not $inLispVM and $BreakMode in '(nobreak query resume) =>
+ $inLispVM := true
+ systemError ERROR_-FORMAT('"~a",[c])
+ $BreakMode = "letPrint2" =>
+ $BreakMode := nil
+ THROW("letPrint2",nil)
+
diff --git a/src/interp/sys-driver.boot b/src/interp/sys-driver.boot
index 1274564f..12f0a022 100644
--- a/src/interp/sys-driver.boot
+++ b/src/interp/sys-driver.boot
@@ -165,7 +165,12 @@ restart() ==
$currentLine := nil
openDatabases()
readSpadProfileIfThere()
+)if %hasFeature KEYWORD::GCL
spad()
+)else
+ SETQ(_*DEBUGGER_-HOOK_*,LAMBDA(c h, systemErrorHandler c))
+ !(handler-bind ((error #'|systemErrorHandler|)) (|spad|))
+)endif
--%