diff options
author | Ludovic Courtès <ludo@gnu.org> | 2010-10-08 13:50:24 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2010-10-08 15:25:56 +0200 |
commit | 7390e4bd11418371bc4a744e2eee1ca40b9c9531 (patch) | |
tree | 3eadb203cabdf1922bc3bdc9d31b5f9777f928f0 /module/system/repl/error-handling.scm | |
parent | 7f593bc7f9ab9ebf4e64ce7e28f85bdcbbe8906f (diff) | |
download | guile-7390e4bd11418371bc4a744e2eee1ca40b9c9531.tar.gz |
Fixlets for REPL error handling.
* module/system/repl/error-handling.scm (error-string): Don't call
`display-error' when STACK is empty.
(call-with-error-handling): Display ERROR-MSG instead of using
`format', since ERROR-MSG may contain `format' escapes.
* module/system/repl/repl.scm (run-repl): Add missing argument to
`format'.
Diffstat (limited to 'module/system/repl/error-handling.scm')
-rw-r--r-- | module/system/repl/error-handling.scm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/module/system/repl/error-handling.scm b/module/system/repl/error-handling.scm index 34a158f8a..609d9c3a1 100644 --- a/module/system/repl/error-handling.scm +++ b/module/system/repl/error-handling.scm @@ -38,6 +38,7 @@ (lambda () (pmatch args ((,subr ,msg ,args . ,rest) + (guard (> (vector-length stack) 0)) (display-error (vector-ref stack 0) (current-output-port) subr msg args rest)) (else @@ -147,7 +148,7 @@ (debug (make-debug stack 0 error-msg))) (with-saved-ports (lambda () - (format #t error-msg) + (display error-msg) (format #t "Entering a new prompt. ") (format #t "Type `,bt' for a backtrace or `,q' to continue.\n") ((@ (system repl repl) start-repl) #:debug debug)))))) |