normalize error message for mem{ber|q|v}
Restore roughly the old error message for BC, but also adjust it to use the modern error-message style (with newlines).
This commit is contained in:
parent
274e4b95b1
commit
3244fa7a3c
|
@ -5,7 +5,8 @@
|
|||
;; helper for member error cases
|
||||
(define-values (bad-list)
|
||||
(λ (who orig-l)
|
||||
(raise-mismatch-error who "not a proper list: " orig-l)))
|
||||
(raise-arguments-error who "not a proper list"
|
||||
"in" orig-l)))
|
||||
|
||||
(define-values (member)
|
||||
(letrec-values ([(member)
|
||||
|
|
|
@ -1742,7 +1742,7 @@ scheme_checked_list_ref(int argc, Scheme_Object *argv[])
|
|||
static void mem_past_end(const char *name, Scheme_Object *s_arg, Scheme_Object *arg)
|
||||
{
|
||||
scheme_contract_error(name,
|
||||
"reached a non-pair",
|
||||
"not a proper list",
|
||||
"in", 1, arg,
|
||||
"looking for", 1, s_arg,
|
||||
NULL);
|
||||
|
|
|
@ -111,7 +111,7 @@
|
|||
" in: ~s")
|
||||
irritants)]
|
||||
[(or (eq? who 'memq) (eq? who 'memv))
|
||||
(values "not a proper list: ~s" irritants)]
|
||||
(values "not a proper list\n in: ~s" irritants)]
|
||||
[(equal? str "~s is not a valid index for ~s")
|
||||
(cond
|
||||
[(exact-nonnegative-integer? (car irritants))
|
||||
|
|
Loading…
Reference in New Issue
Block a user