Hi, I noticed that mixing exception handling from both styles does not work well with the srfi-34 egg as it is. I'm afraid after importing srfi-34 one has to be aware that there now two definitions of with-exception-handler. One from chicken's library and the srfi-34 one.
So far I can't see any damage from overwriting the library version with the srfi-34 version. The attached patch does just this. Best regards /Jörg
diff -u a/srfi-34.scm b/srfi-34.scm --- a/srfi-34.scm 2015-08-22 10:23:24.309039564 +0200 +++ b/srfi-34.scm 2015-08-22 10:23:08.469551364 +0200 @@ -13,7 +13,8 @@ raise guard) -(import (except chicken with-exception-handler) scheme) +(import scheme (only chicken make-parameter :) + (prefix chicken chicken:)) (define current-exception-handlers (make-parameter @@ -36,12 +37,14 @@ (with-exception-handlers (cons handler (current-exception-handlers)) thunk)) +(set! chicken:with-exception-handler with-exception-handler) + (define (raise obj) (let ((handlers (current-exception-handlers))) (with-exception-handlers (cdr handlers) (lambda () ((car handlers) obj) - (error "handler returned" + (chicken:error "handler returned" (car handlers) obj)))))
_______________________________________________ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users