another *SL error-rewriting fix
Arity errors no include supplied arguments, but strip them away for *SL messages.
This commit is contained in:
parent
269a3392dc
commit
255e3cbe2e
|
@ -115,11 +115,11 @@
|
|||
(lambda (all one two) (format "expects a ~a" two)))
|
||||
(list #rx"expects type (<([^>]+)>)"
|
||||
(lambda (all one two) (format "expects a ~a" two)))
|
||||
(list #px"application: wrong number of arguments.*\n procedure: ([^\n]*)\n expected[^:]*: at least (\\d+)\n given[^:]*: (\\d+)"
|
||||
(list #px"application: wrong number of arguments.*\n procedure: ([^\n]*)\n expected[^:]*: at least (\\d+)\n given[^:]*: (\\d+)(?:\n arguments:(?:\n [^\n]*)*)?"
|
||||
(lambda (all one two three) (argcount-error-message one two three #t)))
|
||||
(list #px"application: wrong number of arguments.*\n procedure: ([^\n]*)\n expected[^:]*: (\\d+)\n given[^:]*: (\\d+)(?:\n arguments:(?:\n [^\n]*)*)?"
|
||||
(lambda (all one two three) (argcount-error-message one two three)))
|
||||
(list #px"contract violation\n expected: (.*?)\n given: ([^\n]*)(?:\n argument position: ([^\n]*))?(?:\n other arguments:.*)?"
|
||||
(list #px"contract violation\n expected: (.*?)\n given: ([^\n]*)(?:\n argument position: ([^\n]*))?"
|
||||
(lambda (all ctc given pos) (contract-error-message ctc given pos)))
|
||||
(list #rx"^procedure "
|
||||
(lambda (all) ""))
|
||||
|
@ -127,6 +127,8 @@
|
|||
(lambda (all) ", given "))
|
||||
(list #rx"; other arguments were:.*"
|
||||
(lambda (all) ""))
|
||||
(list #px"(?:\n other arguments:(?:\n [^\n]*)*)"
|
||||
(lambda (all) ""))
|
||||
(list #rx"expects a (struct:)"
|
||||
(lambda (all one) "expects a "))
|
||||
(list #rx"list or cyclic list"
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
(htdp-err/rt-test (/) "/: expects at least 2 arguments, but found none")
|
||||
(htdp-err/rt-test (+ 1) #rx"^[+]: expects at least 2 arguments, but found only 1$")
|
||||
|
||||
(htdp-syntax-test #'(local [(define x 5)] x) "local: this function is not defined")
|
||||
(htdp-syntax-test #'(recur name ([x 18]) x) "recur: this function is not defined")
|
||||
|
|
Loading…
Reference in New Issue
Block a user