cs: more divide-by-zero exception conversions

This commit is contained in:
Matthew Flatt 2019-01-17 15:28:42 -07:00
parent 22b721be8a
commit f5babc4246

View File

@ -690,9 +690,14 @@
exn:fail:contract:arity]
[(and (format-condition? v)
(who-condition? v)
(eq? '/ (condition-who v))
(#%memq (condition-who v) '(/ modulo remainder quotient atan angle log))
(string=? "undefined for ~s" (condition-message v)))
exn:fail:contract:divide-by-zero]
[(and (format-condition? v)
(who-condition? v)
(#%memq (condition-who v) '(expt atan2))
(string=? "undefined for values ~s and ~s" (condition-message v)))
exn:fail:contract:divide-by-zero]
[(and (format-condition? v)
(or (string=? "attempt to reference undefined variable ~s" (condition-message v))
(string=? "attempt to assign undefined variable ~s" (condition-message v))))