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
|
||||
: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)
|
||||
|
||||
Reference in New Issue
Block a user