diff options
author | Jay Xu <jay.xu.krfantasy@gmail.com> | 2021-11-05 17:20:14 +0800 |
---|---|---|
committer | Jay Xu <jay.xu.krfantasy@gmail.com> | 2021-11-18 14:45:45 +0800 |
commit | 578ea8fda533d09776124510c6b962736337e139 (patch) | |
tree | 0a5c23285c46155976c4b32bb787f0ca52b478d9 /src | |
parent | 03da1c17253856d8713bc5a25140cb5002c9c188 (diff) | |
download | geiser-chez-578ea8fda533d09776124510c6b962736337e139.tar.gz geiser-chez-578ea8fda533d09776124510c6b962736337e139.tar.bz2 |
add debugger support
Diffstat (limited to 'src')
-rw-r--r-- | src/geiser/geiser.ss | 11 |
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, |