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