From fde17c15678ebe4c8eebb5ceba79166711e7de80 Mon Sep 17 00:00:00 2001 From: Sam Tobin-Hochstadt Date: Sun, 13 Dec 2009 03:17:05 +0000 Subject: [PATCH] Provide more information in `hash/c' error messages. Signed-Off-By: sstrickl svn: r17279 --- collects/scheme/contract/private/misc.ss | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/collects/scheme/contract/private/misc.ss b/collects/scheme/contract/private/misc.ss index 744d3a491f..4023886f88 100644 --- a/collects/scheme/contract/private/misc.ss +++ b/collects/scheme/contract/private/misc.ss @@ -1198,14 +1198,14 @@ (λ (val) (unless (hash? val) (raise-contract-error val src-info pos-blame orig-str - "expected a hash")) + "expected a hash, got ~a" val)) (case immutable [(#t) (unless (immutable? val) (raise-contract-error val src-info pos-blame orig-str - "expected an immutable hash"))] + "expected an immutable hash, got ~a" val))] [(#f) (when (immutable? val) (raise-contract-error val src-info pos-blame orig-str - "expected a mutable hash"))] + "expected a mutable hash, got ~a" val))] [(dont-care) (void)]) (hash-for-each