From: Chris Hanson Date: Mon, 16 Apr 2018 02:16:38 +0000 (-0700) Subject: Change guarantee to show context of error. X-Git-Tag: mit-scheme-pucked-x11-0.3.1~7^2~126 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=dabc5b302ebbc07ea9d116095550634eb515c74b;p=mit-scheme.git Change guarantee to show context of error. --- diff --git a/src/runtime/boot.scm b/src/runtime/boot.scm index 0a36e5200..7ac9cd8fd 100644 --- a/src/runtime/boot.scm +++ b/src/runtime/boot.scm @@ -403,9 +403,9 @@ USA. (set-predicate<=! p1 p2)))) (define (guarantee predicate object #!optional caller) - (if (predicate object) - object - (error:not-a predicate object caller))) + (if (not (predicate object)) + (error:not-a predicate object caller)) + object) (define (error:not-a predicate object #!optional caller) (error:wrong-type-argument object (predicate-description predicate) caller))