summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scheme/plt/geiser/eval.ss16
1 files changed, 9 insertions, 7 deletions
diff --git a/scheme/plt/geiser/eval.ss b/scheme/plt/geiser/eval.ss
index 8022a4c..ec86370 100644
--- a/scheme/plt/geiser/eval.ss
+++ b/scheme/plt/geiser/eval.ss
@@ -46,9 +46,8 @@
(vector-ref (struct->vector e) 0))
(define (set-last-error e)
- (set! last-result `((error (key . ,(exn-key e))
- (subr)
- (msg . ,(exn-message e))))))
+ (set! last-result `((error (key . ,(exn-key e)))
+ (output . ,(exn-message e)))))
(define (set-last-result v . vs)
(set! last-result `((result ,v ,@vs))))
@@ -57,10 +56,13 @@
(set-last-result (void))
(with-handlers ((exn? set-last-error))
(update-module-cache spec form)
- (call-with-values
- (lambda () (eval form (module-spec->namespace spec)))
- set-last-result))
- last-result)
+ (let ((out
+ (with-output-to-string
+ (lambda ()
+ (call-with-values
+ (lambda () (eval form (module-spec->namespace spec)))
+ set-last-result)))))
+ (append last-result `((output . ,out))))))
(define compile-in eval-in)