summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)