Provide more information in `hash/c' error messages.
Signed-Off-By: sstrickl svn: r17279
This commit is contained in:
parent
961ece3ffe
commit
fde17c1567
|
@ -1198,14 +1198,14 @@
|
||||||
(λ (val)
|
(λ (val)
|
||||||
(unless (hash? val)
|
(unless (hash? val)
|
||||||
(raise-contract-error val src-info pos-blame orig-str
|
(raise-contract-error val src-info pos-blame orig-str
|
||||||
"expected a hash"))
|
"expected a hash, got ~a" val))
|
||||||
(case immutable
|
(case immutable
|
||||||
[(#t) (unless (immutable? val)
|
[(#t) (unless (immutable? val)
|
||||||
(raise-contract-error val src-info pos-blame orig-str
|
(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)
|
[(#f) (when (immutable? val)
|
||||||
(raise-contract-error val src-info pos-blame orig-str
|
(raise-contract-error val src-info pos-blame orig-str
|
||||||
"expected a mutable hash"))]
|
"expected a mutable hash, got ~a" val))]
|
||||||
[(dont-care) (void)])
|
[(dont-care) (void)])
|
||||||
|
|
||||||
(hash-for-each
|
(hash-for-each
|
||||||
|
|
Loading…
Reference in New Issue
Block a user