diff options
author | dos-reis <gdr@axiomatics.org> | 2008-08-21 14:56:48 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2008-08-21 14:56:48 +0000 |
commit | 27ab3bdab9b9499046f0a1e380024a88d6d6275b (patch) | |
tree | 5578fc267430e7518b18ddfdddac3b49de9f97c1 /src/interp | |
parent | 6511f77b63b9a74b65ac7e3d8f1a3f053970cb75 (diff) | |
download | open-axiom-27ab3bdab9b9499046f0a1e380024a88d6d6275b.tar.gz |
* interp/g-error.boot (systemErrorHandler): New.
* interp/sys-driver.boot (restart): Use it.
Diffstat (limited to 'src/interp')
-rw-r--r-- | src/interp/g-error.boot | 14 | ||||
-rw-r--r-- | src/interp/sys-driver.boot | 5 |
2 files changed, 19 insertions, 0 deletions
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 --% |