From ba38e61e768a5e2b6ccdebc09262e3186a8cf15b Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Mon, 29 Jun 2009 00:27:28 +0200 Subject: PLT: Better load/compile file results reporting. --- scheme/plt/geiser/eval.ss | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'scheme/plt/geiser') 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) -- cgit v1.2.3