diff options
Diffstat (limited to 'tests/gpgscm')
-rw-r--r-- | tests/gpgscm/init.scm | 10 | ||||
-rw-r--r-- | tests/gpgscm/tests.scm | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/gpgscm/init.scm b/tests/gpgscm/init.scm index b32172b12..f8fd71a1b 100644 --- a/tests/gpgscm/init.scm +++ b/tests/gpgscm/init.scm @@ -544,13 +544,14 @@ ; ; "Catch" establishes a scope spanning multiple call-frames until ; another "catch" is encountered. Within the recovery expression -; the thrown exception is bound to *error*. +; the thrown exception is bound to *error*. Errors can be rethrown +; using (apply throw *error*). ; ; Exceptions are thrown with: ; ; (throw "message") ; -; If used outside a (catch ...), reverts to (error "message) +; If used outside a (catch ...), reverts to (error "message") (define *handlers* (list)) @@ -573,13 +574,12 @@ (macro (catch form) (let ((label (gensym))) `(call/cc (lambda (**exit**) - (push-handler (lambda (*error*) (**exit** ,(cadr form)))) + (push-handler (lambda *error* (**exit** ,(cadr form)))) (let ((,label (begin ,@(cddr form)))) (pop-handler) ,label))))) -(define (*error-hook* . args) - (throw args)) +(define *error-hook* throw) ;;;;; Definition of MAKE-ENVIRONMENT, to be used with two-argument EVAL diff --git a/tests/gpgscm/tests.scm b/tests/gpgscm/tests.scm index 0738bc687..7b88e0ebb 100644 --- a/tests/gpgscm/tests.scm +++ b/tests/gpgscm/tests.scm @@ -411,7 +411,7 @@ (if error (begin (for-each remove-temporary-file tmpfiles') - (throw error))) + (apply throw error))) (loop tmpfiles' sink (cdr cmds)))))) (define (tr:open pathname) |