From 578ea8fda533d09776124510c6b962736337e139 Mon Sep 17 00:00:00 2001 From: Jay Xu Date: Fri, 5 Nov 2021 17:20:14 +0800 Subject: add debugger support --- src/geiser/geiser.ss | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/geiser') 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, -- cgit v1.2.3