cs: recognize more Scheme errors
We'll want a better approach eventually.
This commit is contained in:
parent
a7989924fa
commit
9310b1e14c
|
@ -664,10 +664,13 @@
|
||||||
[else
|
[else
|
||||||
(|#%app|
|
(|#%app|
|
||||||
(cond
|
(cond
|
||||||
[(and (format-condition? v)
|
[(or (and (format-condition? v)
|
||||||
(or (string-prefix? "incorrect number of arguments" (condition-message v))
|
(or (string-prefix? "incorrect number of arguments" (condition-message v))
|
||||||
(string-suffix? "values to single value return context" (condition-message v))
|
(string-suffix? "values to single value return context" (condition-message v))
|
||||||
(string-prefix? "incorrect number of values received in multiple value context" (condition-message v))))
|
(string-prefix? "incorrect number of values received in multiple value context" (condition-message v))))
|
||||||
|
(and (message-condition? v)
|
||||||
|
(or (string-prefix? "incorrect argument count in call" (condition-message v))
|
||||||
|
(string-prefix? "incorrect number of values from rhs" (condition-message v)))))
|
||||||
exn:fail:contract:arity]
|
exn:fail:contract:arity]
|
||||||
[(and (format-condition? v)
|
[(and (format-condition? v)
|
||||||
(who-condition? v)
|
(who-condition? v)
|
||||||
|
@ -675,7 +678,8 @@
|
||||||
(string=? "undefined for ~s" (condition-message v)))
|
(string=? "undefined for ~s" (condition-message v)))
|
||||||
exn:fail:contract:divide-by-zero]
|
exn:fail:contract:divide-by-zero]
|
||||||
[(and (format-condition? v)
|
[(and (format-condition? v)
|
||||||
(string=? "attempt to reference undefined variable ~s" (condition-message v)))
|
(or (string=? "attempt to reference undefined variable ~s" (condition-message v))
|
||||||
|
(string=? "attempt to assign undefined variable ~s" (condition-message v))))
|
||||||
(lambda (msg marks)
|
(lambda (msg marks)
|
||||||
(|#%app| exn:fail:contract:variable msg marks (car (condition-irritants v))))]
|
(|#%app| exn:fail:contract:variable msg marks (car (condition-irritants v))))]
|
||||||
[else
|
[else
|
||||||
|
|
Loading…
Reference in New Issue
Block a user