1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-31 01:10:24 +02:00

Do not enter the debugger if the thrown key is in `pass-keys'

* module/system/repl/error-handling.scm (call-with-error-handling):
  Do _not_ enter the debugger if the thrown key is in `pass-keys'.
  Previously, for example, (throw 'quit) entered the debugger when run
  from the REPL, despite the fact that 'quit is in `pass-keys'.
This commit is contained in:
Mark H Weaver 2011-03-22 11:11:53 -04:00
parent 190d4b0d93
commit 8099352769

View file

@ -122,6 +122,7 @@
(case on-error (case on-error
((debug) ((debug)
(lambda (key . args) (lambda (key . args)
(if (not (memq key pass-keys))
(let* ((tag (and (pair? (fluid-ref %stacks)) (let* ((tag (and (pair? (fluid-ref %stacks))
(cdar (fluid-ref %stacks)))) (cdar (fluid-ref %stacks))))
(stack (narrow-stack->vector (stack (narrow-stack->vector
@ -142,7 +143,7 @@
(format #t "~a~%" error-msg) (format #t "~a~%" error-msg)
(format #t "Entering a new prompt. ") (format #t "Entering a new prompt. ")
(format #t "Type `,bt' for a backtrace or `,q' to continue.\n") (format #t "Type `,bt' for a backtrace or `,q' to continue.\n")
((@ (system repl repl) start-repl) #:debug debug)))))) ((@ (system repl repl) start-repl) #:debug debug)))))))
((report) ((report)
(lambda (key . args) (lambda (key . args)
(if (not (memq key pass-keys)) (if (not (memq key pass-keys))