summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-06-29 00:27:28 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-06-29 00:27:28 +0200
commitba38e61e768a5e2b6ccdebc09262e3186a8cf15b (patch)
treed44a39ec656c393f658f927aecb6f3b5ee0220e7
parent25eb14784cc57ee585fb2eca4437caad243eee59 (diff)
downloadgeiser-chez-ba38e61e768a5e2b6ccdebc09262e3186a8cf15b.tar.gz
geiser-chez-ba38e61e768a5e2b6ccdebc09262e3186a8cf15b.tar.bz2
PLT: Better load/compile file results reporting.
-rw-r--r--scheme/plt/geiser/eval.ss17
1 files changed, 6 insertions, 11 deletions
diff --git a/scheme/plt/geiser/eval.ss b/scheme/plt/geiser/eval.ss
index 1ac94a3..435b73b 100644
--- a/scheme/plt/geiser/eval.ss
+++ b/scheme/plt/geiser/eval.ss
@@ -67,17 +67,12 @@
(define compile-in eval-in)
(define (load-file file)
- (with-handlers ((exn? set-last-error))
- (let ((current-path (namespace->module-path-name (last-namespace))))
- (update-module-cache file)
- (set-last-result
- (string-append (with-output-to-string
- (lambda ()
- (load-module file (current-output-port))))
- "done."))
- (load-module (and (path? current-path)
- (path->string current-path)))))
- last-result)
+ (let ((current-path (namespace->module-path-name (last-namespace)))
+ (result (eval-in `(load-module ,file (current-output-port))
+ 'geiser/eval)))
+ (update-module-cache file)
+ (load-module (and (path? current-path) (path->string current-path)))
+ result))
(define compile-file load-file)