Replace throw with an assert

This commit is contained in:
oakes
2014-08-23 23:11:38 -04:00
parent a72df8b0ad
commit 97a3938039

View File

@@ -64,10 +64,8 @@ complicated shapes. If you use `assoc` to set the overall :x and :y of the
:y 10
:angle 45)"
[type & options]
(when (seq (clojure.set/intersection #{:begin :end} (set options)))
(-> "No need to call :begin or :end, because it's done for you."
Throwable.
throw))
(assert (empty? (clojure.set/intersection #{:begin :end} (set options)))
"No need to call :begin or :end, because it's done for you.")
`(let [entity# ~(if (keyword? type)
`(assoc (shape*) :type (shape-type ~type))
type)