From f5babc4246dd91ebada02733fbc47e8850e7092b Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 17 Jan 2019 15:28:42 -0700 Subject: [PATCH] cs: more divide-by-zero exception conversions --- racket/src/cs/rumble/error.ss | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/racket/src/cs/rumble/error.ss b/racket/src/cs/rumble/error.ss index 6573412ea5..756875bca6 100644 --- a/racket/src/cs/rumble/error.ss +++ b/racket/src/cs/rumble/error.ss @@ -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))))