the debugger now propagates nonserious conditions upwards instead of

trapping on them.
This commit is contained in:
Abdulaziz Ghuloum 2009-06-26 11:33:32 +03:00
parent 1803f9f23c
commit 30ac7870de
2 changed files with 28 additions and 24 deletions

View File

@ -249,29 +249,33 @@
(define (guarded-start proc)
(with-exception-handler
(lambda (con)
(define (help)
(printf "Exception trapped by debugger.\n")
(print-condition con)
(printf "~a\n"
(string-append
"[t] Trace. "
"[r] Reraise exception. "
"[c] Continue. "
"[q] Quit. "
"[?] Help. ")))
(help)
((call/cc
(lambda (k)
(new-cafe
(lambda (x)
(case x
[(R r) (k (lambda () (raise-continuable con)))]
[(Q q) (exit 0)]
[(T t) (print-all-traces)]
[(C c) (k void)]
[(?) (help)]
[else (printf "invalid option\n")])))
void))))
(define (enter-debugger con)
(define (help)
(printf "Exception trapped by debugger.\n")
(print-condition con)
(printf "~a\n"
(string-append
"[t] Trace. "
"[r] Reraise exception. "
"[c] Continue. "
"[q] Quit. "
"[?] Help. ")))
(help)
((call/cc
(lambda (k)
(new-cafe
(lambda (x)
(case x
[(R r) (k (lambda () (raise-continuable con)))]
[(Q q) (exit 0)]
[(T t) (print-all-traces)]
[(C c) (k void)]
[(?) (help)]
[else (printf "invalid option\n")])))
void))))
(if (serious-condition? con)
(enter-debugger con)
(raise-continuable con)))
proc))
)

View File

@ -1 +1 @@
1810
1811