summaryrefslogtreecommitdiff
path: root/src/geiser
diff options
context:
space:
mode:
authorJay Xu <jay.xu.krfantasy@gmail.com>2021-11-05 17:20:14 +0800
committerJay Xu <jay.xu.krfantasy@gmail.com>2021-11-18 14:45:45 +0800
commit578ea8fda533d09776124510c6b962736337e139 (patch)
tree0a5c23285c46155976c4b32bb787f0ca52b478d9 /src/geiser
parent03da1c17253856d8713bc5a25140cb5002c9c188 (diff)
downloadgeiser-chez-578ea8fda533d09776124510c6b962736337e139.tar.gz
geiser-chez-578ea8fda533d09776124510c6b962736337e139.tar.bz2
add debugger support
Diffstat (limited to 'src/geiser')
-rw-r--r--src/geiser/geiser.ss11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/geiser/geiser.ss b/src/geiser/geiser.ss
index 478b9af..afa58c3 100644
--- a/src/geiser/geiser.ss
+++ b/src/geiser/geiser.ss
@@ -54,11 +54,14 @@
(lambda (k)
(with-exception-handler
(lambda (e)
+ (debug-condition e) ; save the condition for the debugger
(k `((result "")
- (output . ,(with-output-to-string
- (lambda ()
- (display-condition e))))
- (error (key . chez-error-message)))))
+ (output . ,(format "~a~%~a"
+ (get-output-string output-string)
+ (with-output-to-string
+ (lambda ()
+ (display-condition e)))))
+ (error (key . geiser-debugger)))))
(lambda ()
(call-with-values
;; evaluate form, allow for multiple return values,