summaryrefslogtreecommitdiff
path: root/module/system/repl/error-handling.scm
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2010-10-05 21:50:57 +0200
committerAndy Wingo <wingo@pobox.com>2010-10-05 21:50:57 +0200
commitee02e238a36fb1fb2f5308ce56bc9f95dbb1d955 (patch)
tree9d6618f3f95133a93b647a8decd2c9872a5bfb87 /module/system/repl/error-handling.scm
parent586aff5a27fc880b8f80e20352e3bad41c75616c (diff)
downloadguile-ee02e238a36fb1fb2f5308ce56bc9f95dbb1d955.tar.gz
debug-trap-handler ephemeral trap enhancement
* module/system/repl/error-handling.scm (call-with-error-handling): If the given index is false, assume this was an ephemeral trap, and don't print a welcome message or reference the trap by index.
Diffstat (limited to 'module/system/repl/error-handling.scm')
-rw-r--r--module/system/repl/error-handling.scm12
1 files changed, 8 insertions, 4 deletions
diff --git a/module/system/repl/error-handling.scm b/module/system/repl/error-handling.scm
index 72193a89b..34a158f8a 100644
--- a/module/system/repl/error-handling.scm
+++ b/module/system/repl/error-handling.scm
@@ -72,13 +72,17 @@
;; invoking the start-stack thunk has its own frame
;; too.
0 (and tag 1)))
- (error-msg (format #f "Trap ~d: ~a" trap-idx trap-name))
+ (error-msg (if trap-idx
+ (format #f "Trap ~d: ~a" trap-idx trap-name)
+ trap-name))
(debug (make-debug stack 0 error-msg)))
(with-saved-ports
(lambda ()
- (format #t "~a~%" error-msg)
- (format #t "Entering a new prompt. ")
- (format #t "Type `,bt' for a backtrace or `,q' to continue.\n")
+ (if trap-idx
+ (begin
+ (format #t "~a~%" 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)))))
(define (null-trap-handler frame trap-idx trap-name)