From 30ac7870de4f838b2705c24997d4a30cc35c8ef6 Mon Sep 17 00:00:00 2001 From: Abdulaziz Ghuloum Date: Fri, 26 Jun 2009 11:33:32 +0300 Subject: [PATCH] the debugger now propagates nonserious conditions upwards instead of trapping on them. --- scheme/ikarus.debugger.ss | 50 +++++++++++++++++++++------------------ scheme/last-revision | 2 +- 2 files changed, 28 insertions(+), 24 deletions(-) diff --git a/scheme/ikarus.debugger.ss b/scheme/ikarus.debugger.ss index 4ad4fdf..3741b6e 100644 --- a/scheme/ikarus.debugger.ss +++ b/scheme/ikarus.debugger.ss @@ -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)) ) diff --git a/scheme/last-revision b/scheme/last-revision index 3fb00d8..8ec6294 100644 --- a/scheme/last-revision +++ b/scheme/last-revision @@ -1 +1 @@ -1810 +1811