From 97a393803926d5f814faaa67bffef29ced5e190a Mon Sep 17 00:00:00 2001 From: oakes Date: Sat, 23 Aug 2014 23:11:38 -0400 Subject: [PATCH] Replace throw with an assert --- src/play_clj/core_graphics.clj | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/play_clj/core_graphics.clj b/src/play_clj/core_graphics.clj index bb141e7..edb3195 100644 --- a/src/play_clj/core_graphics.clj +++ b/src/play_clj/core_graphics.clj @@ -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)